Tuesday, September 06, 2005

Insufficient result space to convert uniqueidentifier value to char.

I needed a char representation of a GUID field but couldn't retrieve it because of an obscure error :-s

Insufficient result space to convert uniqueidentifier value to char.

This was caused by a CAST as varchar without specifying the length (or a too short length).

Just using CAST(field as char(36)) solved the problem.

2 comments:

Anonymous said...

Thanks!

saved me ages looking :)

WesleyB said...

You are most welcome ;-)