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
 Transact-SQL (2000)
 Comma and semicolum Delimited String

Author  Topic 

Sirchrisak
Starting Member

19 Posts

Posted - 2005-06-23 : 11:09:06
Hi gurus, Can Anyone help me with a script that will accept comma and semicolum delimited string indicating colums and rows respectively.The scrip will split the string first by semicolum and then By colum and insert into Table A .It will then loop and Insert as long as ther are more Semicolum in the String
thnks

Chris

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-06-23 : 11:19:07
I think you need Bulk Insert
Read Books On Line for more information

Madhivanan

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

xpherion
Starting Member

4 Posts

Posted - 2005-06-28 : 11:04:07
BULK INSERT tempdb..mytable
FROM '\\file_path\test.txt'
WITH (
FIELDTERMINATOR = ';',
ROWTERMINATOR = '\n'
)

Also look for bulk insert help on sql query analyzer.
Thanks




SQL Help Blog
http://www.xpherion.com/blog.asp
Go to Top of Page
   

- Advertisement -