dbTalk Databases Forums  

Setting Global Variable with GetDate()

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


Discuss Setting Global Variable with GetDate() in the microsoft.public.sqlserver.dts forum.



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

Default Setting Global Variable with GetDate() - 03-10-2005 , 12:33 PM






Within a Dynamic Properties Task, I'm trying to set a Global Variable to the
system date using the query: Select GetDate(). This should work, but it's
not. I can set a variable using a query that selects a date from a table, but
not using GetDate.

Help needed,
Rob

Reply With Quote
  #2  
Old   
Simon Worth
 
Posts: n/a

Default Re: Setting Global Variable with GetDate() - 03-10-2005 , 12:47 PM






Are you getting an error message?
I can do it on my end. What data type for the global variable are you
using?

--
Simon Worth


"Rob Hamilton" <Rob Hamilton (AT) discussions (DOT) microsoft.com> wrote

Quote:
Within a Dynamic Properties Task, I'm trying to set a Global Variable to
the
system date using the query: Select GetDate(). This should work, but it's
not. I can set a variable using a query that selects a date from a table,
but
not using GetDate.

Help needed,
Rob



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

Default Re: Setting Global Variable with GetDate() - 03-10-2005 , 12:49 PM



Works for me.

Choose a database connection(SQL Server)
Now enter a "QUERY" of SELECT Getdate() against this connection for the
Value property of your GV

This works for me.

Allan




"Rob Hamilton" <Rob Hamilton (AT) discussions (DOT) microsoft.com> wrote


Quote:
Within a Dynamic Properties Task, I'm trying to set a Global Variable to the
system date using the query: Select GetDate(). This should work, but it's
not. I can set a variable using a query that selects a date from a table, but
not using GetDate.

Help needed,
Rob


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.