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

Supress data that exists in another field

Status
Not open for further replies.

piovesan

Technical User
Jan 23, 2002
159
0
0
CA
I have one table called TableA that has the following fields:
UniqueID
ParentID
All are text fields

I am creating a report that pulls in the same table twice into the database so that I can link as follows:
TableA has a left outer join from UniqueID to TableA_1.ParentID

The data could be like this:
UniqueID ParentID
LGT1 SS4
LGT2 SS4
LGT3 SS3
SS4
SS3
SEC1
BRG1
SGN1 SS3

Where you can see not all uniqueIDs have a parentID, and the ParentIDs can be a uniqueID too.

The result for the report is that I want to create a list with the ParentIDs and their related UniqueIDs ..... and I want the UniqueIDs that don't have a parentID to also show up in the report, but I DON'T want to see the UniqueIDs if they are also a ParentID.

So hopefully the report would look like this (grouped on the ParentID):
ParentID UniqueID
SS3 LGT3
SGN1

SS4 LGT1
LGT2

SEC1 "none"

BRG1 "none"

Thanks for any help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top