dbTalk Databases Forums  

Setting SQL parameters in subqueries

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


Discuss Setting SQL parameters in subqueries in the microsoft.public.sqlserver.dts forum.



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

Default Setting SQL parameters in subqueries - 02-03-2004 , 04:51 AM






Hi all

I would like to know what the easiest way is to set a SQL-parameter (prepar
it?) in a DTS ExecuteSQLtask
Normally when programming in Delphi I format the SQL-statement before I hoo
it up to the Query as SQL-statement with the Format-function, but ca
something like this be done for instance in an ActiveXTask or how should
do this inside a package

Any help appreciated

Franci


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

Default Re: Setting SQL parameters in subqueries - 02-03-2004 , 04:55 AM






You do not mention which version of SQL Server you are using but personally
I would build the statement in an Active Script task. Your parameters to
the statement would be held in Global Variables.

You then build the statement before assigning it to the ExecuteSQL task

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

--

----------------------------

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.allisonmitchell.com - Expert SQL Server Consultancy.
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


"francis" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hi all,

I would like to know what the easiest way is to set a SQL-parameter
(prepare
it?) in a DTS ExecuteSQLtask.
Normally when programming in Delphi I format the SQL-statement before I
hook
it up to the Query as SQL-statement with the Format-function, but can
something like this be done for instance in an ActiveXTask or how should I
do this inside a package?

Any help appreciated,

Francis




Reply With Quote
  #3  
Old   
Francis
 
Posts: n/a

Default RE: Setting SQL parameters in subqueries - 02-03-2004 , 05:06 AM



Hi

Seems there was an article "Global Variables and SQL statements in DTS
about this in www.sqldts.com, but failed to find it earlier. Sorry for the ignorance
Link to the article is
http://www.sqldts.com/Default.aspx?20

Will use this example

Greetings

Franci


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.