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
Office 2003 and 2007 printing problem
Record the type SQL 2005 and C#
flash spininning indicator
Microsoft Office Outlook Credential Loop
Problem debugging ASP.net applications in Visual Studio 2010
Macro to copy and paste values for a range based on date
SqlCommand.ExecuteReader not returning any error even when there is an error in the query.
Dynamic vs Differencing Disks
Outlook 2007 -- ToDo List WINDOW
VB script