Re: [cx-oracle-users] expecting None or a string
Brought to you by:
atuining
From: Anurag C. <anu...@gm...> - 2011-10-24 18:39:07
|
The print returns this SELECT count(*) FROM T WHERE NBR = '1' and ID='1' Both NBR and ID are varchar in my case. This query works fine when executed directly using Oracle PL/SQL Plus Regards, Anurag On Tue, Oct 25, 2011 at 12:05 AM, Larry Martell <lar...@gm...>wrote: > On Mon, Oct 24, 2011 at 12:31 PM, Anurag Chourasia > <anu...@gm...> wrote: > > Hi All, > > I am getting an error "expecting None or a string" when executing a > simple > > SQL Query as this. > > query = "SELECT count(*) FROM T WHERE NBR = '%s' and ID='%s'" %(nbr,id) > > print query > > cursor.execute(query) > > This was working fine before and I have neither changed the code nor > update > > cx_Oracle or Oracle version etc. > > Well, what do you get when you print out the query? nrb or id probably > don't have the value you think. > > > ------------------------------------------------------------------------------ > The demand for IT networking professionals continues to grow, and the > demand for specialized networking skills is growing even more rapidly. > Take a complimentary Learning@Cisco Self-Assessment and learn > about Cisco certifications, training, and career opportunities. > http://p.sf.net/sfu/cisco-dev2dev > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |