Shpigford
Shpigford

Reputation: 25378

PGError: ERROR: syntax error at or near "NULL"

Can't figure out what on earth this postgresql error is talking about.

PGError: ERROR:  syntax error at or near "NULL"
LINE 1: ...at` < '2011-01-18 21:52:21.607956' OR `checked_at` IS NULL) 
                                                                 ^
: SELECT * FROM "accounts" WHERE (`checked_at` < '2011-01-18 21:52:21.607956' OR `checked_at` IS NULL)

Any ideas what that could be?

Upvotes: 1

Views: 6059

Answers (2)

jschorr
jschorr

Reputation: 3054

Try this:

SELECT * FROM accounts WHERE (checked_at < '2011-01-18 21:52:21.607956' OR checked_at IS NULL)

Upvotes: 0

Michael Irigoyen
Michael Irigoyen

Reputation: 22957

The backticks are your problem.

SELECT * FROM accounts WHERE (checked_at < '2011-01-18 21:52:21.607956' OR checked_at IS NULL)

Upvotes: 3

Related Questions