[BangPypers] psycopg2 problem

JAGANADH G jaganadhg at gmail.com
Mon Oct 26 12:52:37 CET 2009


On Mon, Oct 26, 2009 at 5:15 PM, Anand Chitipothu <anandology at gmail.com>wrote:

> >>
> > Right .
> > Any how I am facing new problem now. See the error. Any hint ?
> >
> >   dbcursor.execute( "SELECT id,text FROM %s " ) % indbtname
> > psycopg2.ProgrammingError: syntax error at or near "%"
> > LINE 1: SELECT id,text FROM %s
>
> You should construct the query first and then pass the query as
> argument to execute function.
>
> I suggest you to go through basic python tutorial before trying some
> serious programming. Python Tutorial is best place to start.
>
> http://docs.python.org/tutorial/index.html
>
> Anand
>
Thanks . I am a newbe to databse programming . First time.

-- 
**********************************
JAGANADH G
http://jaganadhg.freeflux.net/blog

Sent from Chennai, TN, India


More information about the BangPypers mailing list