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

Compare the same field to itselft to find duplicates

Status
Not open for further replies.

vblack7770

Programmer
Apr 11, 2005
26
US
I am using Crystal 8.5 with and ODBC connection to and Oracle DB. I need to compare a # field on each record and get a list of those records where the # field is the same. I need a report that returns all records where the # field has been duplicated.

Subreport, maybe?

Is there a way to do this in a While Printing Records formula set with no subreport?

 
It's simpler than this, but first I suggest that you use Crystal native connectivity instead, it's much faster. If you must use ODBC, make sure that you use the Crystal supplied Oracle ODBC driver, not the Oracle supplied ODBC driver.

To get only duplicate rows, group on the # field, and then in the Report->Edit Selection Formula->Group place:

count({table.number},{table.number}) > 1

-k
 
Insert a group on the field, let's call it {Table.number}, and then go report->selection formula->GROUP and enter:

count({table.number},{table.number}) > 1

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top