Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Parameters and Execute SQL Task

Author  Topic 

sb
Starting Member

3 Posts

Posted - 2008-04-02 : 10:52:04
I know you can pass parameters into a Direct Input and a Stored Proc in the Execute SQL Task Editor, but can you pass parameters to a File Connection? If so, then how would I do that?

Thank you,

Steve...

igorblackbelt
Constraint Violating Yak Guru

407 Posts

Posted - 2008-04-02 : 11:42:41
No, you can't pass a parameter to a File Connection, however, you can build file connection string dynamically. What exactly are you trying to accomplish?
Go to Top of Page

sb
Starting Member

3 Posts

Posted - 2008-04-02 : 16:32:14
I would like to have an if statement in a query (stored in a file - can't do stored procs on the server) based on a value that is passed in from SSIS.
Go to Top of Page

igorblackbelt
Constraint Violating Yak Guru

407 Posts

Posted - 2008-04-03 : 09:50:57
What part of your statement needs to be dynamic? Why does it need to be stored in a file?
Go to Top of Page

sb
Starting Member

3 Posts

Posted - 2008-04-11 : 20:11:59
If I cannot do stored procs (no permissions) and I do not want to include the sql in SSIS or code, where else can I store the sql? I would like to be able to use the file sql just as if it was a stored proc where you are passing parameters to the proc.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-04-12 : 01:20:21
You can define a variable that holds your full SQL string and other variables for your parameters. You can form your SQL string out of your parameter variables. Give the Evaluate as expression property of your SQL string variable as true and make reqd expression along with parameter variables. Then use this SQL string variable as your SQL query in your Oledcommand or OLE DB source task by using 'Command from variable' option.
Go to Top of Page
   

- Advertisement -