DjangoPeng
DjangoPeng

Reputation: 23

postgresql error: column "xx" does not exist of equal operator

I try to find some specific rows with equal operator:

select * 
from noteevents
where DESCRIPTION = "Report"
order by charttime
limit 100
;

But I don't know it gives me an error which is

ERROR:  column "Report" does not exist
LINE 3: where DESCRIPTION = "Report"
                        ^
********** Error **********

ERROR: column "Report" does not exist
SQL state: 42703
Character: 46

And the noteevents structure is as follow:

Screenshot 1

Upvotes: 1

Views: 1219

Answers (1)

Gordon Linoff
Gordon Linoff

Reputation: 1269623

Use single quotes for string constants:

select * 
from noteevents
where DESCRIPTION = 'Report'
order by charttime
limit 100;

Double quotes are for escaping the names of columns and tables.

Upvotes: 2

Related Questions