explorerhq / sql-explorer

SQL reporting that Just Works. Fast, simple, and confusion-free. Write and share queries in a delightful SQL editor, with AI assistance.
https://www.sqlexplorer.io
Other
2.76k stars 365 forks source link

Heroku PostGress not working Query #343

Closed ghost closed 4 years ago

ghost commented 6 years ago

Hi there,

Have installed my parking app on heroku. Heroku comes built with postres sql. When i run a simple query like :

SELECT *
FROM parcare_parking
WHERE parking_on = DATE_ADD(NOW(), INTERVAL 1

i got this error.

The same with --SELECT * FROM parcare_parking WHERE parking_on = "2018-10-08"

column "2018-10-08" does not exist LINE 1: SELECT * FROM parcare_parking WHERE parking_on = "2018-10-08... ^

What should i do? My app is in production :( thank you!

jarshwah commented 5 years ago

@iocohen I'm not sure if you figured this out already, but try using single quotes for your date. By using double quotes the query will interpret as an aliased column.

SELECT * FROM parcare_parking WHERE parking_on = '2018-10-08'

You'll probably need to coerce the string to a timestamp though.

marksweb commented 4 years ago

Closing old issue.