When I execute the code below in Teradata Studio 14.2, I get 0 rows returned. When I execute it in SQL Assistant 13.10, I get 129 rows, which is correct. The connections for both applications point to the same destination. The database is version 13.10.
What have I missed in my setup of Studio?
SELECT P. DbName sourceDB, P. TblName sourcetbl, DatabaseName referenceDB , TVMName referencetbl, TableKind AS "Type" FROM dbc . TVM T, dbc. dbase D, ( Select trim ( Databasename) DbName, trim( Tablename) TblName from dbc. tables where databasename in ( 'FPDW_core') ) P WHERE D .DatabaseId = T. DatabaseId AND CreateText LIKE '%"' || P. DbName || '"."' || P. TblName || '"%' ( NOT CS) AND D. databasenameI= 'FPDW_BVAL' UNION SELECT P .DbName , P. TblName, DatabaseName, TVMName, TableKind AS "Type" FROM dbc . TextTbl X, dbc. dbase D, dbc. TVM T, ( Select trim ( Databasename) DbName, trim( Tablename) TblName from dbc. tables where databasename in ( 'FPDW_core') ) P WHERE X .TextType = 'C' AND X. TextString LIKE '%"' || P. DbName || '"."' || P. TblName || '"%' ( NOT CS) AND X. DatabaseId= D .DatabaseId AND X. TextId= T. TVMId AND D. databasenameI= 'FPDW_BVAL' UNION SELECT P .DbName , P. TblName, ChildDB, ChildTable, 'T' FROM dbc. RI_Distinct_Children, ( Select trim ( Databasename) DbName, trim( Tablename) TblName from dbc. tables where databasename in ( 'FPDW_core') ) P WHERE ParentDB = P. DbName AND ParentTable= P .TblName ;
Forums: