PROVE IT !!If you know it then PROVE IT !! Skill Proficiency Test

How to generate a list of tables which are of type " SET " in Teradata ?

Q 31) How to generate a list of tables which are of type ” SET ” in Teradata ?

Answer >

SEL DATABASENAME,TABLENAME, ‘SET’ AS STATUS FROM DBC.TABLES WHERE TABLEKIND=’T’ AND CHECKOPT=’N’
AND (DATABASENAME,TABLENAME) NOT IN (SELECT DATABASENAME,TABLENAME FROM DBC.INDICES WHERE INDEXTYPE=’P’ AND UNIQUEFLAG=’Y’ GROUP BY 1,2)
AND DATABASENAME LIKE <***** List the databasename for which you want to find SET Tables ****>

Add a Comment

Your email address will not be published. Required fields are marked *