Re: [SQL] Query is executing but giving error when using with shell scripting

Поиск
Список
Период
Сортировка
От Andreas Kretschmer
Тема Re: [SQL] Query is executing but giving error when using with shell scripting
Дата
Msg-id C759012E-7A15-49A5-A4C3-B9F7D18F6418@a-kretschmer.de
обсуждение исходный текст
Ответ на [SQL] Query is executing but giving error when using with shell scripting  (srilinux <srilinux09@gmail.com>)
Ответы [SQL] Re: Query is executing but giving error when using with shellscripting  (srilinux <srilinux09@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: srilinux
Дата:
Сообщение: [SQL] Query is executing but giving error when using with shell scripting
Следующее
От: srilinux
Дата:
Сообщение: [SQL] Re: Query is executing but giving error when using with shellscripting