Post Author: snufse
CA Forum: Data Connectivity and SQL
We are using CR XI. I am developing a report that compares records in 2 tables. The tables have the same name SALESTKT (where one table is being replicated into the other). They reside in 2 different data bases on 2 different servers. In the data base expert I have:
ODBC for RGWP Remote with Salestkt table and ODBC RGWP Local with Salestkt1 table (CR gives this an alias name I guess isnce names are the same)
Should I use the "add command" to enter my sql code and if so on which connection (RGWP Remote or RGWP Local)? I tried this but it does but I get an error that file salestkt1 is not a valid file in the data base (which is correct since it was renamed by CR). Is there a way in my sql code to use alias name and where the sql code accepts 2 files name even if they are the same in reality?
Select SALESTKT.TICKET_ID, SALESTKT.TICKET_DATE, SALESTKT.TICKET_TIMEfrom SALESTKTwhere not exists (select 1 from SALESKT1 whereSALESTKT.TICKET_ID = SALESTKT1.TICKET_ID and SALESTKT.TICKET_DATE= SALESTKT1.TICKET_DATE and SALESTKT.TICKET_TIME = SALESTKT1.TICKET_TIME)