unicode constants in queries

LabKey Support Forum (Inactive)
unicode constants in queries Will Holtz  2017-08-12 11:42
Status: Closed
 
In a query file, I would like to replace a character with a zero width space, to allow for line breaks. I tried

replace(myField, '/', U&'\200B') AS myNewField

But I get an error 'Could not resolve column: U'. Is there away to write a unicode constant in Labkey SQL? I'm sure I can accomplish this by adding Java code for column formatting, but doing it in a query would be much simpler....

The underlying DB is Postgresql, and I am still running Labkey v17.1

Thanks!
-Will
 
 
adam responded:  2017-08-12 18:12
Have you tried the chr() function? For example:

replace(myField, '/', chr(8203)) AS myNewField

Adam

 
Will Holtz responded:  2017-08-12 20:51
For some reason, I thought chr() was limited to ASCII, but you are correct.

thanks! -Will

 
Leo Dashevskiy responded:  2017-09-01 12:40
Took the liberty…