Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Case statement on Variable SSIS

$
0
0

Hi friends,

I have a small issue in my package I would like to write a case statement on Variable or Column in derived column Transformation

I was using forloop container that pulls the data from different database so the database names also loading into table under one of the column but I wanna load with integer value instead database name

for example

Database A -- 1

Database B -- 2

so I would like to write a case statement on variable or column but It was not allowing me to write when I tried.

what I have tried was I took one derived transformation and added one new column and passed that variable to that new column.

then again I took another derived transformation here I was trying to write case statement on the colum which is belongs to previous derived column.

Derived Column Tran 1:

Derived Column Name         Expression                        DataType

RegionID                           @[User::InitialDB]        Unicodestring[DT_WSTR]

Derived Column Tran2:

Can anyone please check and guide me the solution please.

Thanks for your help


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>