parameter in select clause
Hi,
I need a select like that as source in data flow:
select a, b, ?, d
from x
where e = ?
In the where clause it's ok, i'm using a variable. But in the select clause i can't, the OLE DB Data Source gives an error. I've read in Microsoft® SQL Server™ 2008 Integration Services UNLEASHED that "some
OLEDB providers do not allow parameters to be used for column names".
So, is there any way to solve this?
Thanks a lot!
November 23rd, 2010 4:26pm
you can create another variable of type string, let's name it SelectCommand
then right click on it, select properties, then in properties window
set expression property as :
"select a, b, "+@[User::variable1]+", d from x where e = "+@[User::variable2]
then set EvaluateAsExpression as true.
now in your oledb source
set data access mode as sql command from variable
and set source variable as User::SelectCommand
http://www.rad.pasfu.com
Free Windows Admin Tool Kit Click here and download it now
November 23rd, 2010 4:33pm
Raad, thank you!!
It works perfectly!!
November 23rd, 2010 5:11pm