Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

SQL results in Studio 14.2 don't match results from SQL Assistant 13.10 - forum topic by levinra

$
0
0

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
;    

 


Viewing all articles
Browse latest Browse all 27759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>