Groups | Blog | Home
all groups > sql server dts > june 2004 >

sql server dts : Global Variables in SQL Statements


Nex
6/18/2004 3:55:03 PM
Hey all,

A simple statement below:

DROP TABLE [Table_1]

What I'm trying to do--essentially--is this:

DROP TABLE [?]

And pass in a global variable as a parameter. Conventional
wisdom says that with DROP's and CREATE's it's not
possible to do this. I say to hell with conventional wisdom,
I'm sure someone out there has done this before. FWIW,
I did see a reference to a "gvcustomtask" on sqldts.com which
would allow for such things, BUT, it involves outside code
with a "use at your own risk" disclaimer, so I'm somewhat
leery of bringing it into a production environment.

Ideas, anyone? Thanks very much!

Nex
6/18/2004 4:32:42 PM
Never mind, I ran it in as an "execute sql task" but ran the sql through
the workflow properties as an activex script. Got the variables in that
way. Works like a dream.


[quoted text, click to view]

Allan Mitchell
6/19/2004 6:32:26 AM
That is your only way as well. ? is not very good at being used as an
object name.

--
--

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


[quoted text, click to view]

AddThis Social Bookmark Button