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
IF/OR formula acting like an IF/AND formula
User.Identity.Name s not stored in table - Store Procedure
Best way to make users stay within ranges and warn users of conflicts
Cisco Wireless Access Point - Guest & Internal SSIDs
Help adding minutes to time value
type="checkbox" and alert in javascript
Check syntax of SQL Select statement in access vba code
How do I restore a ghost image to different drives/partitions of different size?
was updating 4.0 to 4.1 and got error can't start any vm's
How i add social networks sharing icon into my articles ? - module -