Click here to Skip to main content
15,886,806 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
In my SSIS, I’m using “OLE DB Source” and in “OLE DB Source Editor” in the “SQL Command text” box I have:
SQL
Declare myvar int
Set myvar = Dts.Variables["User::theID"].Value
SELECT    *   FROM   dbo.myTable     
where (myTableId  in (SELECT  (CASE myTableId WHEN 0 THEN max(myTableId)
                                      ELSE myTableId END)))

I also defined theID in as variable. But this is not working and gives me error.
Thank you in advance
Posted
Updated 21-Jul-12 22:44pm
v2

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900