Hello,
How to query a field in DBXQuery that contains colon?
I ran the following query and got an error. Thank you
| dbxquery connection=visibility query="select abc:def from tableCompany"
org.postgresql.util.PSQLException: ERROR: syntax error at or near ":" Position:
I tried to put single quote
| dbxquery connection=visibility query="select 'abc:def' from tableCompany"
but it gave me the following result
?column? |
abc:def |
abc:def |
My bad. I didn't look to see what database you were using. You may need quotes around it = "abc:def". Since you're doing this inside a quoted string, you may need to escape them as \" in the string.
My bad. I didn't look to see what database you were using. You may need quotes around it = "abc:def". Since you're doing this inside a quoted string, you may need to escape them as \" in the string.
Your suggestion worked. Thank you so much
| dbxquery connection=visibility query="select \"abc:def\" from tableCompany"
Try brackets around the field name - [abc:def]
Hello,
I put brackets around the field name [abc:def], but it still didn't work and got the following error
org.postgresql.util.PSQLException: ERROR: syntax error at or near "["
Thank you