Link to home
Start Free TrialLog in
Avatar of wppiexperts
wppiexpertsFlag for United States of America

asked on

SSIS: Using variable in OLE DB SQL command text

Is there a way to reference a variable as part of the SQL command text in the OLE DB source editor?

For example if I have a variable defined as myVar::
SELECT myVar, Account, CustName from Customers

resulting in output of:
RESIDENTIAL, 100, Steve
RESIDENTIAL, 200, Jim
etc.

ASKER CERTIFIED SOLUTION
Avatar of EvilPostIt
EvilPostIt
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of wppiexperts

ASKER

so the only way to incorporate a variable like that is to build a variable containing the SQL string, there is now way to reference it via @User:: or anything like that?
Yes you reference it using the source component after selecting the "SQL Command from variable" drop down.