Re: [SQL] Query is executing but giving error when using with shell scripting - Mailing list pgsql-sql

From Andreas Kretschmer
Subject Re: [SQL] Query is executing but giving error when using with shell scripting
Date
Msg-id C759012E-7A15-49A5-A4C3-B9F7D18F6418@a-kretschmer.de
Whole thread Raw
In response to [SQL] Query is executing but giving error when using with shell scripting  (srilinux <srilinux09@gmail.com>)
Responses [SQL] Re: Query is executing but giving error when using with shellscripting
List pgsql-sql
On 14 September 2017 17:58:07 GMT+02:00, srilinux <srilinux09@gmail.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


--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

pgsql-sql by date:

Previous
From: srilinux
Date:
Subject: [SQL] Query is executing but giving error when using with shell scripting
Next
From: srilinux
Date:
Subject: [SQL] Re: Query is executing but giving error when using with shellscripting