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 dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EXISTS command in CR XI

Status
Not open for further replies.

adurantech

IS-IT--Management
Nov 3, 2005
1
US
I am trying to create a report from an SQL database 2 tables TMSHT and COMMENTS.
TMSHT has all the transactions that happened by date. COMMENTS has the comments that were entered for a specific date (if any).

I am trying to get a report that will print all transactions and their corresponding comments if any. But I am either getting all the transactions without the comments or just the transactions that have a comment (not both).

I was trying to us the EXISTS command but come to find out that it is not supported in XI.

Any help is greatly appreciated.

 
Link the 2 tables together and use an outer join on the TMSHT table.

HTH

Gary Parker
MIS Data Analyst
Manchester, England
 
Crystal supports whatever SQL you want to use via a Command object. Under the connection you'll see Add Command listed, which allows you to use whatever you'd like.

As Gary adeptly pointed out, you can probably just use a Left Outer join to accomplish this, but if you're filtering on the child table, then you won't get all of the main tables rows.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top