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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extracting from records

Status
Not open for further replies.

minli98

IS-IT--Management
Aug 30, 2005
178
US
Hi,

I have a table where each row in column X contains product ids separated by commas.
Code:
        X
Row 1   123,334,445
Row 2   223,123
Row 3   033,445,110,331

How can I write a query that returns each product id in a row? In the above example, the query would return
Code:
       Query
Row 1  123
Row 2  334
Row 3  445
Row 4  223
Row 5  123
etc...

Is this possible with sql? Thank you in advance.

Regards,
Min
 
It can be done, but I think it would be rather labor intensive. Why do you need to do this?

A wise man once said
"The only thing normal about database guys is their tables".
 
Take a look at this thread: thread183-1243232

If you have any followup questions, feel free to post them here.

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top