On Wed, Sep 21, 2011 at 11:01 AM, patrick keshishian <pkeshish@xxxxxxxxx> wrote:
On Wed, Sep 21, 2011 at 7:54 AM, akp geek <akpgeek@xxxxxxxxx> wrote:
Try:> 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
You need to double quotes since you are using single quotes in your SQL string.
psql -d mydb -c "update tb_user set accountstatus='A' where userid=123"
--patrick