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
 Import/Export (DTS) and Replication (2000)
 separate comma delineated data

Author  Topic 

kelcog
Starting Member

3 Posts

Posted - 2006-03-13 : 14:47:47
i have a package that imports data from a text file into a table in my database. one of the fields that is imported has comma delineated values. I need to use a SQL statement in my package to separate those values and place them into separate fields in my table.

Can anyone give me a lead as to how to do this? I am stumped.

Srinika
Master Smack Fu Yak Hacker

1378 Posts

Posted - 2006-03-13 : 16:27:29
U can make use of the DTS package and do ur task
One way is to use TextFile as the Source
Go to Top of Page

kelcog
Starting Member

3 Posts

Posted - 2006-03-13 : 17:11:12
Okay, but i am confused about where to begin.

so far my package
gets files via ftp
imports file to temp database
uses sql query to format a few fields into format needed for real database

and here is where i need to access a field in the temp database that has values that look like item1,item2,item3,etc. and put them in field1, field2, field3, etc of the real database.

The "do ur task" is the part I don't understand
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-03-14 : 03:03:25
Refer the split function
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=50648

Madhivanan

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

- Advertisement -