How do I select a column of type uniqueidentifier when I have a guid?
I’ve tried doing following:
SELECT * FROM MyTable WHERE id = '442402e-207d-b012-4b60-005056c00123'
and
SELECT * FROM MyTable WHERE id = '{442402e-207d-b012-4b60-005056c00123}'
Both give me same error: Error converting data type varchar to uniqueidentifier.
The first query is ok, but you are missing a digit on the first part of the GUID, it should have 8 digits, not seven….something like this: