I got this weird issue, can’t figure out how to solve it.
My table has these columns (in this order):
- ID (uniqueidentifier)
- UserID (uniqueidentifier)
- JobID (uniqueidentifier)
- Archive (bit)
I get this error-message:
Msg 8169, Level 16, State 2, Line 1
Conversion failed when converting from a character string to uniqueidentifier.
INSERT INTO AcceptedJobs VALUES
(NEWID(),
CONVERT(uniqueidentifier,'32c5a126-a063-4d5c-98f5-0b8f9b18dc04'),
CONVERT(uniqueidentifier,'5d454187-b45d40b4-b90b-06a8662de634'),
0)
SQL-Azure
Your second string can’t be converted to
UNIQUEIDENTIFIERdatatype. I’m guessing that you are missing a-:I tested this and it works, though I’m not sure if its the same UID that you need.