SSIS Expression

  • Let's say we have this query

    select * from customer

    where customerid = '1'

    My question is can we create this "customerid = '1'" condition as a variable in SSIS which will take its value from a parameter.

    basically I have a table(TABle1) in which i have list of condition , this is how table looks like

    EID Condition

    1 customerid = '1'

    2 customerid = '2'

    3 customerid = '3'

    and I my OLEDB Source which I want some thing like

    select * from customers

    where @test-2 = ?

    @test-2 is FULL RESULT from Execute SQL TASK - select * from table1 where we have conditions.

  • I've done something similar using a foreach loop going over a recordset, this in turn runs a vb component that sets the value of a SSIS variable that is used to change the sql connection statement of your OLE DB datasource. Does that make sense?

  • Why don't you go over the whole process, like what to you do with that resultset, give us some detail at a higher level and not just the immediate problem. I think there is probably a better way.

    CEWII

  • I sure hope there is a better way, mines a pretty inefficient way to do things.

  • It may well be a F-E-L but that is ok, it just seems that it is more complex than need be..

    CEWII

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

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