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
Finding the oldest date from a set of max dates
How do I enable the Create Email button in Access 2007 forms?
Why aren't all my profiles showing up with I boot up in SAFE MODE?
Can send from Windows Live but not from Outlook 2007
Coldfusion Regex find question
Ethernet adapter issue
How to delete all files and folders in users MyDocs
ssrs 2008r2 - Oracle 64bit access problem from Report builder 3.0
Recordset giving error invalid operation error
What hardware specs are your SCCM 2007 Servers running?