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)
 CSV columns to rows

Author  Topic 

sysadmin
Starting Member

2 Posts

Posted - 2005-06-01 : 18:04:02
I have a CSV file that need "parsed" into rows.
See this:
test,test1,test2,test3,test4,test5
value,value1,value2,value3,value4,value5

Needs to go into SQL like this:
col001 col002
==================
test value
test1 value1
test2 value2
test3 value3

etc etc.

I need this to work though any means, it does not necessarily have to be during the dts.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-06-01 : 18:40:27
We have an article on this here:
http://www.sqlteam.com/item.asp?ItemID=2652

Let us know if you need additional help.

Tara
Go to Top of Page

sysadmin
Starting Member

2 Posts

Posted - 2005-06-03 : 16:57:27
I had already seen that, but I'm not so sure I know how to make that solution work for my needs.

Imagine table1 looks like:
Col001 Col002 Col003 Col004
=============================
test test1 test2 test3
value Value1 Value2 Value3

I need to make table2 look like:

Col001 Col002
===============
test Value
test1 Value1
test2 Value2
test3 Value3

See the many columns I have (about a thousand) need to pivot to rows in a set of two coulmns.
Go to Top of Page
   

- Advertisement -