Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 query problem

Author  Topic 

tran008
Starting Member

38 Posts

Posted - 2007-05-16 : 20:43:04
I a bit stuck with this problem. I trying to query the result if col1 have more then 1 and col2 is not the same, retrieve the fields. eg:

table:
col1--col2
1-----a
1-----b
1-----c
1-----c
2-----a
2-----b
2-----b
3-----a

result want:
1,a,b,c
2,a,b

thanks


khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-05-16 : 21:56:55
see http://sqljunkies.com/WebLog/amachanic/archive/2004/11/10/5065.aspx


KH

Go to Top of Page
   

- Advertisement -