Data Transfer

  • Hi!

    I'm new to SSIS and here is my issue.

    I'm trying to move data from A.Table1 to B.Table1. Now, one of the columns in A.Table1 is Status which stores values "Active" or "InActive" where as the Status column in B.Table1 is Bit.

    Based on the value 'Active' / 'InActive" I wanna insert 1 or 0 in to B.Table1.

    Could you please help me how to make this transformation.

    Thanks in advance!

  • either;

    use a derived column trasformation to change the string value into a bit

    or;

    modify the source sql select statement to include a case statement which will do the conversion for you.

  • Thanks much for your quick reply.

    I'll try using case in Select statement.

    Do we have any option where in we can write the expression in some property of the column ?

    Thanks again!

  • svrprakash (2/9/2011)


    Do we have any option where in we can write the expression in some property of the column ?

    Sorry, I am not sure what you mean..

    I would write the case statement in either a source sql statement, sql view or stored procedure.,

  • I have one more scenario;

    Table A

    Col1 ColB

    Test1~Test2~Test3 30~40~30

    Now, I need to extract the above data from TableA and push to Table B as

    Table B

    Col1 ColB

    Test1 30

    Test2 40

    Test3 30

    Could you please suggest me steps to follow.

    Thanks in advance.

  • That is not clear, does tableA have two columns with csv data in each column?

    I would suggest starting a new thread with the new question, and give it a specific title so more people can help.

    Also when posting table structure please post the DDL used to create the table and some sample data in the form of insert statements. Otherwise it is difficult for people to help.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply