dbTalk Databases Forums  

Urgent....globale variables...

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


Discuss Urgent....globale variables... in the microsoft.public.sqlserver.dts forum.



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

Default Urgent....globale variables... - 04-05-2004 , 04:21 AM






Just finishing off something and made an adjustment regarding global variables - but in a
execute sql statement i cannot seem to be able to use the global variable in an SET statement

Is this true - can it only be used directly in a where statement and not as part of a variable

\Michael Vardinghus

Reply With Quote
  #2  
Old   
Mark Jones
 
Posts: n/a

Default Re: Urgent....globale variables... - 04-05-2004 , 04:46 AM






to set a vairable value in T-SQL use
SELECT @@Varaible = <Value>


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

Quote:
Just finishing off something and made an adjustment regarding global
variables - but in an
execute sql statement i cannot seem to be able to use the global variable
in an SET statement.

Is this true - can it only be used directly in a where statement and not
as part of a variable ?

\Michael Vardinghus



Reply With Quote
  #3  
Old   
Michael Vardinghus
 
Posts: n/a

Default Re: Urgent....globale variables... - 04-05-2004 , 02:01 PM



Thanks Mark

But it wasn't just a variable .. it was a global parameter in a dts package
that I had to throw into a variable in an execute sql statement. Figured it
out - however - it seems like
the sql statement can't do this - but by making a stored procedure instead I
was able to throw the global variable down and use it in a set variable
statement.

\Michael V.

Mark Jones <mjones (AT) messagelabs (DOT) com> wrote

Quote:
to set a vairable value in T-SQL use
SELECT @@Varaible = <Value


"Michael Vardinghus" <anonymous (AT) discussions (DOT) microsoft.com> wrote in
message
news:F7544C83-C95E-4507-966C-BA20113873DF (AT) microsoft (DOT) com...
Just finishing off something and made an adjustment regarding global
variables - but in an
execute sql statement i cannot seem to be able to use the global
variable
in an SET statement.

Is this true - can it only be used directly in a where statement and not
as part of a variable ?

\Michael Vardinghus





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.