I’m trying to convert a varchar(50) column to a uniqueidentifier, but this error keeps popping up all the time, and i don’t know why:
'Msg 8169, Level 16, State 2, Line 1 Conversion failed when converting from a character string to uniqueidentifier.'
The data in the column is currently a valid uniqueidentifier.
What’s the proper way of doing what I want?
Thanks
Do you have any columns containing empty strings? I.e. NOT NULL, string length = 0.
Or do you have any GUIDs with non-standard characters? I.e. not 0-9, A-F?
We have some non-standard GUIDs in my application that were created before I inherited it…
EDIT:
For future help, this script can help you find any rows that aren’t valid:
Any rows that have invalid Guids will show up, and can be found by: