August 1, 2007 at 8:35 am
hi, I have a requirement as stated below
Convert one row in a table to a column:
Input
Name | ID | Date | Profile | Manager |
John | 12 | 1/1/1900 | Admin | 12 |
1 | 1/1/1900 | Admin | 12 |
Name | John | |
ID | 12 | 1 |
Date | 1/1/1900 | 1/1/1900 |
Profile | Admin | Admin |
Manager | 12 | 12 |
I thing i have to use pivot transformation in the data flow but i am not sure how to configure this. Can anyone suggest me how to implemet this or configure this!
Thanks in advance!
August 1, 2007 at 8:59 am
Have you checked out the thread at http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=176962
Francis
August 1, 2007 at 9:33 am
The above thread defines a different senario .... if i am not wrong!!
August 1, 2007 at 10:33 am
You can use the pivot or unpivot component.
Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!
August 1, 2007 at 1:25 pm
Crispin,
The problem is i am not sure what would be the set key and pivot key .... can u please explain little bit more on pivot and unpivot
August 2, 2007 at 9:15 am
'I have a requirement...' - What is the requirement? For a report? For data storage? To display on a web page? The example cited from another forum exactly describes how to convert a row, with 'like' information, to a column. Here, you have unlike information that you want to denormalize.
If you deconstruct and translate the 'business requirements' into plainer language, then you may very well see a better way to meet the requirements (but no guarantee!). At this point, if the solutions offered don't work, then we need a better definition of the problem.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply