July 31, 2002 at 1:38 pm
Question:
Have a table Table1 with the following rows:
PK Fld2 Fld3 Fld4
---- ---- ---- ----
1 58 C D
2 12 K J
3 58 C D
I want to select distinct Fld2, Fld3, and Fld4 in addition to any value of PK, i.e I want my select query to return:
1 , 58 , C, D
2 , 12 , K, J
What is the simplest way of doing that .
thanks
July 31, 2002 at 1:58 pm
I Found It:
Select min(PK), fld2,fld3,fld4
from table1
group by fld2,fld3,fld4
it would work since I did not care which Pk is being returned.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy