Search Postgresql Archives

Re: psql with option -c fails..

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx> 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@xxxxxxxxx
LlamaLand                       https://netllama.linux-sxs.org

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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux