ETL Design Question
Hi Guys, My requirement is to un-pivot one of the CSV File. CSV File Format. SID SName 12QA 12NA 12VA 12LL 1 ABC Y N N N 2 BBC N Y N N 3 CBC N N Y N 4 DBC N N N Y 5 EBC N N Y N 6 FBC N Y N N All want is to convert this to like this. SID SName VER 1 ABC 12QA 2 BBC 12NA 3 CBC 12VA 4 DBC 12LL 5 EBC 12VA 6 FBC 12NA Can anyone give some example to achieve this task. Thanks,
April 20th, 2011 12:28am

Can be achieved with a simple expression in a derived column. Create new column named VER with an expression like this: [12QA] == "Y" ? "12QA" : [12NA] == "Y" ? "12NA" : [12VA] == "Y" ? "12VA" : [12LL] == "Y" ? "12LL" : "" And if you want info about the unpivot transformation: http://www.youtube.com/watch?v=mmCpMWQGw7M http://www.mssqltips.com/tip.asp?tip=1761 Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com
Free Windows Admin Tool Kit Click here and download it now
April 20th, 2011 1:49am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics