dbTalk Databases Forums  

using global variable

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


Discuss using global variable in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Richard Urrutia
 
Posts: n/a

Default using global variable - 08-25-2006 , 03:36 AM






Hello,
I created a DTS to copy some data from a sql server to another.
I would like to use a global variable on a Transform Data Task with a sql
query like
" SELECT * FROM Table Where Id=? " in order to call the DTS with DtsRun.exe
and put the value of the global variable on the command line.
How can I do ?

thanks






Reply With Quote
  #2  
Old   
Charles Kangai
 
Posts: n/a

Default RE: using global variable - 08-25-2006 , 08:41 AM






Yes. Create the global variable. Create your Execute SQL task. Type in the
query with the ? parameter place holder, click on the Parameters button and
map the parameter to the global variable. When you run the package from the
command line, use the /A switch to specify your global variable value. Type
dtsrun /? at the command prompt to see the exact syntax.

Charles Kangai, MCT, MCDBA



"Richard Urrutia" wrote:

Quote:
Hello,
I created a DTS to copy some data from a sql server to another.
I would like to use a global variable on a Transform Data Task with a sql
query like
" SELECT * FROM Table Where Id=? " in order to call the DTS with DtsRun.exe
and put the value of the global variable on the command line.
How can I do ?

thanks







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.