Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can I create a temporary variable?
Message
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
00620349
Message ID:
00955417
Views:
17
Mike,

I always specify the lenght so I don't have to remeber what defaults are.
...
declare @bUID	binary(32)    -- binary - 1 byte by default
...
set @cUID = convert(varchar(50),@@SPID) + @cUID
set @bUID = convert(binary(32), @cUID) 
...
>
>Can someone help me with the following syntax?
>The convert is not working and returning the same 'context_info' every time regardless of you change the @cUID to!
>
>
>declare @cUID	VarChar(50)
>declare @bUID	binary
>
>set @cUID = '2004102843111235'
>
>set @cUID = convert(varchar,@@SPID) + @cUID
>set @bUID = convert(binary, @cUID)
>
>print @cUID
>
>set Context_info @bUID
>
>SELECT context_info
>	FROM master.dbo.sysprocesses
>	WHERE spid = @@SPID
>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform