Re: [GENERAL] psql with option -c fails..

2011-09-21 Thread akp geek
Thanks a lot .. Got it On Wed, Sep 21, 2011 at 11:01 AM, patrick keshishian wrote: > On Wed, Sep 21, 2011 at 7:54 AM, akp geek wrote: > > Hi all - > >I am trying to run the psql command the following way and > > it's failing . Can you please help? > > psql -d myd

Re: [GENERAL] psql with option -c fails..

2011-09-21 Thread patrick keshishian
On Wed, Sep 21, 2011 at 7:54 AM, akp geek 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 e

Re: [GENERAL] psql with option -c fails..

2011-09-21 Thread Lonni J Friedman
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 wrote: > Hi all - >                I am trying to run the psql command the fo

[GENERAL] psql with option -c fails..

2011-09-21 Thread akp geek
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* * * Thank