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

Select Distinct Records in Crystal Reports 6

Status
Not open for further replies.

TanmedIT

IS-IT--Management
Nov 6, 2000
53
US
I know this version is very old, but being in a start-up company, upgrading at this current time is not an option.. So here is my question.. I have a report that has about 8 tables within it, I think I have them all link correctly, but I am still getting numerous duplicate records whic throws off my subtotals.. Is there a way I can select distinct records in this version of Crystal? Its not in the Database Menu in this version.. Thanks in advance
 
Go to Database->Show SQL Query

Copy the existing SQL

In the where clause of the existing SQL type
AND 1 = 0

At the end of the SQL type
UNION

Paste in the SQL and then add a DISTINCT after the SELECT statement.

This will create a Union query wherein the first query will return nothing because of the 1 = 0, and the union SQL will return distinct rows.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top