dbTalk Databases Forums  

create global variables

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


Discuss create global variables in the microsoft.public.sqlserver.dts forum.



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

Default create global variables - 10-08-2003 , 10:58 AM






I would like to create a global varible from a result of
a query. I use the rowset value into glabal varile.
Here is what I did:

SELECT MAX(updateDate)
FROM tblLobbyistDisbursment


click paratmeter/output parameter/row set/

create global variable/
name:glbMaxDate, type: I chose Date, Value: I wonder what
should I put here, I leave it blank.

After I click OK, it tells me: cannot convert varible
from type bstr to type date.
I check the update fields type in my Access database is
Datetime, in SQL server is smalldatetime.

So I don't know where bstr comes from

Any suggestions will be appreciated

Ann

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

Default Re: create global variables - 10-08-2003 , 01:14 PM






In article <105001c38db4$f57c0040$a401280a (AT) phx (DOT) gbl>, Ann
<xiaowei.cao (AT) state (DOT) mn.us> writes
Quote:
I would like to create a global varible from a result of
a query. I use the rowset value into glabal varile.
Here is what I did:

SELECT MAX(updateDate)
FROM tblLobbyistDisbursment


click paratmeter/output parameter/row set/

create global variable/
name:glbMaxDate, type: I chose Date, Value: I wonder what
should I put here, I leave it blank.

After I click OK, it tells me: cannot convert varible
from type bstr to type date.
I check the update fields type in my Access database is
Datetime, in SQL server is smalldatetime.

So I don't know where bstr comes from

Any suggestions will be appreciated

Ann
Just leave the type as a string. It is a variant under the covers any
way. The value can be left blank as it will be set as soon as the
package executes. I always use a string, and if this is wrong, then DTS
will change it for you when you execute the package.


--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



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.