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
 SQL Server Development (2000)
 using a "split" function in sql

Author  Topic 

Vivaldi
Constraint Violating Yak Guru

298 Posts

Posted - 2001-05-10 : 11:38:10
Well,

Back again. I have a table that has some denormalized data (induced by scope creep) that lists contacts and a comma separated string of the facilityids they are contacts for.

FacilityContacts
ID|name|facilitycontacts
Ex:
#| txt| #1, #2

So is there a simple way to turn this
one contact entry into 2 entries, and each entry having a separate facilityid number?

EX:
44| bob | #1
59| suzie | #2

My feeling is I will have to do this in the vb app, is there a simple way to do this in sql.

Also, with this method, is there a way to add a sequence number to each entry?
EX:
44| 1 | bob | #1
59| 2 | suzie | #2



Thanks for the help
(and previous help)
   

- Advertisement -