Microsoft
Software
Hardware
Network
Question : Set variable
Good morning,
Im trying to set a variable which can be used in following SQL statments, but the line I thought would work, gives me errors.
I thought the line "set @tmpPriID = select uuid();", would assign a uuid to the variable @tmpPriID, where I can use it in multiple select statments after, and then call it again to generate a new value to @tmpPriID.
However when I try and execute "set @tmpPriID = select uuid();", I get an error 1064(42000) you have an error in your SQL syntax;.
Any ideas what Im doing wrong?
Thank you
Answer : Set variable
please try:
1: 2: 3: 4: 5:
set @tmpPriID = uuid(); or select @tmpPriID = uuid();
Random Solutions
Is there a limit to how many categories / points you can have in a chart in Reporting Services 2008
Escaping Characters in a SQl Server 2008 Script
make static footer at bottom of webpage
Add a form in an Organisational Forms library
sendmail installation error
asp.net
Install and Configure Windows 2008 Terminal Server on a Windows 2003 AD domain
How to vba programatically prompt the user to enter a password when trying to open a table from the database window
Exchange 2010 IS will not start Error 0x8004010f connecting to Active Directory.
ESX 4, Can not add datastore