dbTalk Databases Forums  

Embedding global variables into SQL statement of Dynamic Properties Task

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


Discuss Embedding global variables into SQL statement of Dynamic Properties Task in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
David Morrison
 
Posts: n/a

Default Embedding global variables into SQL statement of Dynamic Properties Task - 11-07-2003 , 11:47 AM






I've created a Dynamic Properties Task that uses global variables to
substitute the server name and database name into the connections and tasks
of my DTS package. The global variables worked great for setting the
server name property of the connections (which were values), but now I have
a property for my task that's a SQL statement like "delete from
[DestinationDatabase].[dbo].[PM00100]".

Is there any way to embed a global variable into the query for
DestinationDatabase? If not, what are my options?

I'm using constants for my global variables.



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

Default Re: Embedding global variables into SQL statement of Dynamic Properties Task - 11-07-2003 , 12:23 PM






Build it up in an Active Script task

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



--
--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

"David Morrison" <me (AT) nospam (DOT) com> wrote

Quote:
I've created a Dynamic Properties Task that uses global variables to
substitute the server name and database name into the connections and
tasks
of my DTS package. The global variables worked great for setting the
server name property of the connections (which were values), but now I
have
a property for my task that's a SQL statement like "delete from
[DestinationDatabase].[dbo].[PM00100]".

Is there any way to embed a global variable into the query for
DestinationDatabase? If not, what are my options?

I'm using constants for my global variables.





Reply With Quote
  #3  
Old   
David Morrison
 
Posts: n/a

Default Re: Embedding global variables into SQL statement of Dynamic Properties Task - 11-07-2003 , 01:40 PM



Can you direct me to a good source for figuring out how to do that? I'm not
familiar with scripting languages.

"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote

Quote:
Build it up in an Active Script task

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



--
--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

"David Morrison" <me (AT) nospam (DOT) com> wrote in message
news:O9kCFdVpDHA.1084 (AT) tk2msftngp13 (DOT) phx.gbl...
I've created a Dynamic Properties Task that uses global variables to
substitute the server name and database name into the connections and
tasks
of my DTS package. The global variables worked great for setting the
server name property of the connections (which were values), but now I
have
a property for my task that's a SQL statement like "delete from
[DestinationDatabase].[dbo].[PM00100]".

Is there any way to embed a global variable into the query for
DestinationDatabase? If not, what are my options?

I'm using constants for my global variables.







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

Default Re: Embedding global variables into SQL statement of Dynamic Properties Task - 11-07-2003 , 02:21 PM



The article I posted will do it for you.

A good site in general is www.SQLDTS.com

--
--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

"David Morrison" <me (AT) nospam (DOT) com> wrote

Quote:
Can you direct me to a good source for figuring out how to do that? I'm
not
familiar with scripting languages.

"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message
news:O6p3swVpDHA.3688 (AT) TK2MSFTNGP11 (DOT) phx.gbl...
Build it up in an Active Script task

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



--
--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

"David Morrison" <me (AT) nospam (DOT) com> wrote in message
news:O9kCFdVpDHA.1084 (AT) tk2msftngp13 (DOT) phx.gbl...
I've created a Dynamic Properties Task that uses global variables to
substitute the server name and database name into the connections and
tasks
of my DTS package. The global variables worked great for setting the
server name property of the connections (which were values), but now I
have
a property for my task that's a SQL statement like "delete from
[DestinationDatabase].[dbo].[PM00100]".

Is there any way to embed a global variable into the query for
DestinationDatabase? If not, what are my options?

I'm using constants for my global variables.









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.