January 5, 2006 at 6:14 am
Brain has gone blank....
how would you do a select distinct but where you want distinct values from one column but then you want all other columns from the table the problem being one of the other columns has unique values...
hope I have worded this ok.
January 5, 2006 at 6:49 am
Hi Geoff - please provide three or four lines of source data and then an example of the results that you would like, based on that data.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
January 5, 2006 at 6:53 am
Not possible as the 'unique column' will prevent distinction
You will either have to
ignore the 'unique column' e.g.
SELECT col1,col2,col3 FROM
GROUP BY col1,col2,col3
or aggregate the 'unique column' e.g.
SELECT col1,col2,col3,MIN([unique column]) FROM
GROUP BY col1,col2,col3
It would help if you could post DDL, sample data and expected output to better understand your requirements.
Darn, Phil beat me to it
Far away is close at hand in the images of elsewhere.
Anon.
January 6, 2006 at 6:16 am
See http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=169&messageid=248544 which is another example of the same requirement.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply