From: | akp geek <akpgeek(at)gmail(dot)com> |
---|---|
To: | patrick keshishian <pkeshish(at)gmail(dot)com> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: psql with option -c fails.. |
Date: | 2011-09-21 15:02:46 |
Message-ID: | CACnhOf+aa9L8n41m1AZYmY8oO2zpp5qjQnmPGMu0weoFskpmSg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Thanks a lot .. Got it
On Wed, Sep 21, 2011 at 11:01 AM, patrick keshishian <pkeshish(at)gmail(dot)com>wrote:
> 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
>
> Try:
>
> psql -d mydb -c "update tb_user set accountstatus='A' where userid=123"
>
> You need to double quotes since you are using single quotes in your SQL
> string.
>
> --patrick
>
From | Date | Subject | |
---|---|---|---|
Next Message | Raymond O'Donnell | 2011-09-21 15:03:53 | Re: Storing PHP 5.3 sessions into PostgreSQL 8.4 |
Previous Message | patrick keshishian | 2011-09-21 15:01:08 | Re: psql with option -c fails.. |