Groups | Blog | Home
all groups > sql server dts > july 2006 >

sql server dts : Use SSIS for split rows in columns


Anja
7/28/2006 8:22:02 AM
Hi,
I've many rows and I want to split them in many columns, with SSIS.
I've this scenario:

INPUT TABLE

id date
--------------------
1 2006-02-04
1 2006-03-08
1 2006-10-15
2 2006-03-07
2 2006-09-17

OUTPUT TABLE

id date1 date2 date3
-----------------------------------------------------
1 2006-02-04 2006-03-08 2006-10-15
2 2006-03-07 2006-09-17 null

How kind of instrument I must use????

Thanks in advance
Allan Mitchell
7/29/2006 12:00:00 AM
Hello Anja,

I personally would be using a Script Component (Or Custom Transform) to do
this or you could of course use the Pivot Transform (remember to sort the
input).

ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/extran9/html/55f5db6e-6777-435f-8a06-b68c129f8437.htm

The problem though is that you are required to know how many values would
be in the Value column (date)

If as in your example you have 3 then uyou can use either of my examples


Allan



[quoted text, click to view]

AddThis Social Bookmark Button