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
 General SQL Server Forums
 New to SQL Server Programming
 Select distinct on field with values seperated by

Author  Topic 

gosman
Starting Member

4 Posts

Posted - 2006-04-05 : 07:26:33
I have a db that contains a column named DSCODES. Values in DSCODES are seperated by a comma.

If I run the following command.

select distinct(DSCODES) from DB

The following is returned.

S100,S102,S103
S100,S103,S105

What I would like returned is the following

S100
S102
S103
S105

Is this possible?

Thank you in advance

Graham

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-04-05 : 07:35:44
use the CSVTable in this thread http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=25830



KH


Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-04-05 : 09:04:17
Also refer
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=50648

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -