On 14 September 2017 17:58:07 GMT+02:00, srilinux <srilinux09(at)gmail(dot)com> wrote:
>Please suggest what is giving error here
>when I execute from psql prompt, I get the result, when I try to
>automate
>using a shell script, the query is not working
>
># `/usr/bin/psql -U postgres -d coba1 -c "select name from users
>where
>"Date" > current_date - 30;"`
>ERROR: column "Date" does not exist
>LINE 1: select name from users where Date >current_...
>
>
>========
>
Remove the " from Date, or write "date". It is just a quoting-problem.
Regards, Andreas
--
2ndQuadrant - The PostgreSQL Support Company