update column according to source

  • create table updt(id int,sourcename nvarchar(10))

    insert into values(2),(3),(4)

    i have dimension table in which i am loading data from different sources in ID column.Now i want to update sourcename column

    according to the name of the source from which data is comming.for e,g "A" is coming from source1 so i want to update sourcename column as source1 and

    "Z" is coming from source3 so i want to update sourcename column as source3.I want to make it dynamically so that sourcename column would change according to

    source from data is coming.i want to do it when i am loading data using SSIS. my result should look like this.

    insert into values (A,'source1'),(X,'source2'),(Z,'source3')

  • What are your sources?

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • my sources are tables(oledb source)

  • SSIS doesn't have metadata about OLE DB sources, so the only way you can get the sourcename is to populate a variable yourself.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

Viewing 4 posts - 1 through 3 (of 3 total)

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