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!

Select Statement for duplicate records 1

Status
Not open for further replies.

akar33

Programmer
Dec 13, 2004
39
US
Hello,
Scenario
Table 1 (contains Family Information), unique FamilyID
Formula: outcome Mailing or Physical address (Formula name: ADDRESS)

If FamilyID and ADDRESS are same for more than one record set, then the report should display onle the first occurance.

How can i acheive this, How would I write the code if I am using SELECTstmt (using DISTINCT).

Any help ASAP will be greatly appreciated.

Thanks in advance
 
Hi,
Under File...Report Options, check 'Select Distinct Records'
But..How can there be multiples of a Unique FamilyID?

[profile]
 
When you say first occurence, is there a date field or sequence number associated with it?

if so, go to Select Expert->Formula Editor->Group selection and enter the following formula

address.date = minimum({address.date},{familyID})

 
Or, you could concatenate the two fields in a formula {@concat}:

{table.familyID} + {@address}

Then go to the section expert->details->suppress->x+2 and enter:

{@concat} = previous({@concat})

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top