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
 how to split and get the unique ids

Author  Topic 

pavansagar
Starting Member

2 Posts

Posted - 2006-11-03 : 07:10:50
hai friends,
please help me.Here is my doubt

In a table I have fields like this TABLE NAME : table1
COLUMN NAME : ids
----------------
ids
-----------------
1,3,4
3,4
3
7,1
1
11
6
6,7
1

i want to get all the ids used i.e., 1,2,3,6,7,11

i want to update another table based on the id, which are not listed here.

I am doing like below

declare @IDs varchar(200)
select IDs=ids from table1
update table where(id not in(select ID from timeSplitter(@IDs)))

please help me.it is urgent
thanks in advance
bye
pavansagar





pavansagar

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-11-03 : 08:03:50
You need to split them and compare
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=50648

Also you need Normalization
http://www.datamodel.org/NormalizationRules.html


Madhivanan

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

- Advertisement -