dbTalk Databases Forums  

Passing Parameters to a dts package

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Passing Parameters to a dts package in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Suhas Vengilat
 
Posts: n/a

Default Passing Parameters to a dts package - 08-17-2005 , 11:55 PM






Hi,

Is is possible to pass parameters to dts package, that we need to run using
dtsrun. I have a query like - select a,b,c from table where id in ('x','y').
We need to parameterise the 'in' CLAUSE. What is there in the 'in' CLAUSE can
be more than I have given and it frequently changes. Could someone give a
solution for this.

Thanks in Advance
Suhas


Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Passing Parameters to a dts package - 08-18-2005 , 12:28 AM






A quick and simple way is to build your SQLStatement like this

Global Variables and SQL statements in DTS
(http://www.sqldts.com/default.aspx?205)

You can then pass in the values of the variables to the package using DTSRUN
and the /A switch.


OR


depending how you call the package you could set the SQL Statement using the
object model through code.


OR


You could use the first suggestion but have the package look up the values
in a SQL Server table using the Dynamic Properties task.





"Suhas Vengilat" <SuhasVengilat (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hi,

Is is possible to pass parameters to dts package, that we need to run
using
dtsrun. I have a query like - select a,b,c from table where id in
('x','y').
We need to parameterise the 'in' CLAUSE. What is there in the 'in' CLAUSE
can
be more than I have given and it frequently changes. Could someone give a
solution for this.

Thanks in Advance
Suhas




Reply With Quote
  #3  
Old   
Suhas Vengilat
 
Posts: n/a

Default Re: Passing Parameters to a dts package - 08-18-2005 , 12:43 AM



Hi Allan,

Thanks a lot for these info. I am going to try this and get back to you.

Thanks again.
Suhas


"Allan Mitchell" wrote:

Quote:
A quick and simple way is to build your SQLStatement like this

Global Variables and SQL statements in DTS
(http://www.sqldts.com/default.aspx?205)

You can then pass in the values of the variables to the package using DTSRUN
and the /A switch.


OR


depending how you call the package you could set the SQL Statement using the
object model through code.


OR


You could use the first suggestion but have the package look up the values
in a SQL Server table using the Dynamic Properties task.





"Suhas Vengilat" <SuhasVengilat (AT) discussions (DOT) microsoft.com> wrote in message
news:48247E37-95E9-444D-9DAA-D52ADDE9D433 (AT) microsoft (DOT) com...
Hi,

Is is possible to pass parameters to dts package, that we need to run
using
dtsrun. I have a query like - select a,b,c from table where id in
('x','y').
We need to parameterise the 'in' CLAUSE. What is there in the 'in' CLAUSE
can
be more than I have given and it frequently changes. Could someone give a
solution for this.

Thanks in Advance
Suhas





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.