Forum Discussion
Anonymous
7 years agoNot applicable
Direct Query adding curly brackets to Test GUID Field
I had a source table that was IMPORT mode and took it out and reloaded as DIRECT. The GUID text field for My Item ID field started getting a Curly Bracket {} added around it. Now that field doe...
d_gosbell
7 years agoSuper User
This does look a bit like a bug. My guess would be that in Direct Query mode the conversion from Guid to Text is done in a different layer, while in import mode it's done by the PowerQuery engine.
The only quick fix I can think of is to force the formatting to be consistent. Probably the best thing for performance would be to add the { } braces around the guids in the import table. Or you could use a view for you direct query source and do a "CAST( guidcol as VARCHAR(50))" in that view to force SQL Server to do the conversion to text (which does not include curly braces). The down side of this is that it has to do that conversion for every query.