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!

distinct values

Status
Not open for further replies.

kumariaru

IS-IT--Management
Mar 9, 2006
61
AU
Hi All,
I like to retrieve data from db2 based on 4 columns which are keys..Something like this c1,C2,c3,C4 with distinct values of c4,c2.

I am trying
SELECT DISTINCT( C2,C4) ,C1,C2
FROM CRMADMIN.T_WHSE_PO_DTL
Group by C1,C2,C3,C4
;
I am not able to run it .. Any help is great

Thank you
 
If C1,C2,C3,C4 is the unique key then getting all combinations of the 4 fields based on distinct C4,C2 will net you all unique combinations.
Can you rephrase what you really need , cause this is not making any sense...


Ties Blom

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top