dbTalk Databases Forums  

No Parameters in SQL statement.

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


Discuss No Parameters in SQL statement. in the microsoft.public.sqlserver.dts forum.



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

Default No Parameters in SQL statement. - 07-21-2004 , 07:57 AM






I have a Transform Data Task (TDT) in my package connecting to SQL Server, the SQL in the TDT is 'SELECT [PartNo], [Description], SUM([Qty]) AS Total
FROM DailyProdTotals where ProdDate >= gsLastUploadDate
GROUP BY [PartNo], [Description];', the gsLastUploadDate is a global var, that I retrieve before i execute the TDT, but the TDT says there are no parameters, so I can't save the SQL script in the TDT.
Much appreciated

Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: No Parameters in SQL statement. - 07-21-2004 , 08:52 AM






Change gsLastUploadDate to ?
You cannot use the global variable name directly. To the SQL parser there is
no indiocation that this anything other a column name or other SQL
identifier.

Darren Green
http://www.sqldts.com

"Gary Spence" <GarySpence (AT) discussions (DOT) microsoft.com> wrote

Quote:
I have a Transform Data Task (TDT) in my package connecting to SQL Server,
the SQL in the TDT is 'SELECT [PartNo], [Description], SUM([Qty]) AS Total
FROM DailyProdTotals where ProdDate >= gsLastUploadDate
GROUP BY [PartNo], [Description];', the gsLastUploadDate is a global var,
that I retrieve before i execute the TDT, but the TDT says there are no
parameters, so I can't save the SQL script in the TDT.
Quote:
Much appreciated



Reply With Quote
  #3  
Old   
Richard S. Hale
 
Posts: n/a

Default Re: No Parameters in SQL statement. - 07-21-2004 , 05:26 PM



There will be a button at the bottom of the source tab for the Data pump task for Global variables set them in order of operation.

"Darren Green" wrote:

Quote:
Change gsLastUploadDate to ?
You cannot use the global variable name directly. To the SQL parser there is
no indiocation that this anything other a column name or other SQL
identifier.

Darren Green
http://www.sqldts.com

"Gary Spence" <GarySpence (AT) discussions (DOT) microsoft.com> wrote in message
news:A5A82CDE-A2B8-4A63-B9FE-A498136A16F6 (AT) microsoft (DOT) com...
I have a Transform Data Task (TDT) in my package connecting to SQL Server,
the SQL in the TDT is 'SELECT [PartNo], [Description], SUM([Qty]) AS Total
FROM DailyProdTotals where ProdDate >= gsLastUploadDate
GROUP BY [PartNo], [Description];', the gsLastUploadDate is a global var,
that I retrieve before i execute the TDT, but the TDT says there are no
parameters, so I can't save the SQL script in the TDT.
Much appreciated




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.