From: | Lonni J Friedman <netllama(at)gmail(dot)com> |
---|---|
To: | akp geek <akpgeek(at)gmail(dot)com> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: psql with option -c fails.. |
Date: | 2011-09-21 14:59:10 |
Message-ID: | CAP=oouHNTogi1L3-N+jnMh6Pg6BSmxAtV=J=ZkKSWuB+sVTkzA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
You can't enclose the query in single quotes and then also use single
quotes inside the query. Either escape the quotes inside the query,
or enclose the query in double quotes.
On Wed, Sep 21, 2011 at 7:54 AM, akp geek <akpgeek(at)gmail(dot)com> wrote:
> Hi all -
> I am trying to run the psql command the following way and
> it's failing . Can you please help?
> psql -d mydb -c 'update tb_user set accountstatus='A'
> where userid=123'
> ERROR: column "a" does not exist
> LINE 1: ...date tb_user accountstatus=A
>
> Thanks for the help
> Regards
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
L. Friedman netllama(at)gmail(dot)com
LlamaLand https://netllama.linux-sxs.org
From | Date | Subject | |
---|---|---|---|
Next Message | patrick keshishian | 2011-09-21 15:01:08 | Re: psql with option -c fails.. |
Previous Message | akp geek | 2011-09-21 14:54:48 | psql with option -c fails.. |