Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL record selection - where does it go

Status
Not open for further replies.

mydisney

Programmer
May 7, 2007
55
US
We are using CR XI and I need to select records from 2 different databases which are identical (one remote and one local)and compare. My question is: Where in CR XI would I enter the sql statment, I tried in the "record selection formula editor" and also under "add command" in data base connection. It does not seem to fit in in either places? Thank you.


Select SALESTKT.TICKET_ID,
SALESTKT.TICKET_DATE,
SALESTKT.TICKET_TIME
from SALESTKT
where not exists
(select 1 from SALESKT1 where
SALESTKT.TICKET_ID = SALESTKT1.TICKET_ID
and SALESTKT.TICKET_DATE= SALESTKT1.TICKET_DATE
and SALESTKT.TICKET_TIME = SALESTKT1.TICKET_TIME)

 
Add Command is correct.

"Does not fit" isn't much of a description of a failure, try posting a bit more on the topic...

Perhaps some lithium grease and a shoehorn would help ;)

-k

 
Here is the scope:
Both tables have the same name SALESTKT.
I have one ODBC connection to RGWP Remote and one ODBC connection to RGWP Local. (RGWP Remote is being replicated into RGWP Local and these I need to compare).
Question: On which one of these should I do the "add command" ? Since the two files have same name, one file was renamed to SALESTKT1. After I add my sql command it gives me error that SALESTKT1 is not found in data base.
 
If it says that it doesn't exist, it probably doesn't exist in that ODBC connection.

Make sure that you have 2 ODBC setups, and that you're using the correct one for each.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top