1
select CONCAT(name, desc) from table; 

gives the below error

 ERROR:  syntax error at or near "desc"
 LINE 1: select CONCAT(name, desc) from theme;
                            ^
 SQL state: 42601
 Character: 21

the same query works on sqlserver,hana and oracle? Any help would be appreciated

1 Answer 1

2

desc is a reserved keyword, you have to quote it:

select CONCAT(name, "desc") 
from the_table

If you pay close attention to the ^ in the error message it points exactly to the desc part indicating that this is the problem, not the concat() function.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.