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.
Author |
Topic |
aswindba1
Yak Posting Veteran
62 Posts |
Posted - 2013-04-03 : 15:12:30
|
I need to pull the info from excel to the Database table through SSIS. I need logic for below scenario.Excel Look like below:Server Name Cost Type ValuesSAB245 DRU 200SAB246 DRU 2001SAB247 TAPE 300SAB248 TAPE 3001SAB249 DISK 100SAB250 DISK 1001Output table should be:Server Name DRU Cost TAPE Cost Disk CostSAB245 200 Null Null SAB246 2001 Null Null SAB247 Null 300 NullSAB248 Null 3001 NullSAB249 Null Null 100SAB250 Null Null 1001Please let me know if you need more explanation.thanks |
|
aswindba1
Yak Posting Veteran
62 Posts |
Posted - 2013-04-03 : 16:30:50
|
I need to pull the info from excel to the Database table through SSIS. I need logic for below scenario.Excel Look like below: Server Cost ValuesSAB245 DRU 200SAB246 DRU 2001SAB247 TAPE 300SAB248 TAPE 3001SAB249 DISK 100SAB250 DISK 1001Output table should be:Server DRU TAPE Disk SAB245 200 Null Null SAB246 2001 Null Null SAB247 Null 300 NullSAB248 Null 3001 NullSAB249 Null Null 100SAB250 Null Null 1001Please let me know if you need more explanation.thanks |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-04-04 : 01:28:26
|
it looks like a straight forward task.You just need a data flow task with excel source and OLEDB destination to connect to tableIn between you need a derived column to create three new columns DRU,TAPE and Diskthe expression will be like([Cost]=="DRU"? [Values] : NULL(DT_I4)) for DRU([Cost]=="TAPE"? [Values] : NULL(DT_I4)) for TAPE([Cost]=="Disk"? [Values] : NULL(DT_I4)) for Disk------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
|
|
|