Database, application.
PostgreSQL 11.4 (Ubuntu 11.4-1.pgdg19.04+1),
Dbeaver 6.1.1.
What I need?
Return right values.
What I do.
Here is part of code.
select
if(available_count < 5, "neni skladem", "na sklade") as availability
from
...
Return this.
SQL Error [42703]: ERROR: column "neni skladem" does not exist
Where is the catch?
Thanks.
Best Answer
You have two errors in your statement:
IF
in SQL, you need to use aCASE
expression'
), double quotes are for identifiers