Re: [cx-oracle-users] cx_Oracle.InterfaceError: not a query
Brought to you by:
atuining
From: Anthony T. <ant...@gm...> - 2010-10-07 15:28:22
|
Hi, Not sure exactly what you are trying to accomplish but showing the exact Python code you are executing would be helpful. In any case, the statement shown below is definitely not a query -- it looks very much like an update statement which does not query information but updates information in the database. So you should be simply doing this cursor.execute(your_statement) Do not attempt to fetch from the cursor, though. That will generate the "not a query" exception. Make sense? Anthony On Thu, Oct 7, 2010 at 8:29 AM, John Nielson <mr....@gm...> wrote: > All: > > I have a script that performs a bunch of updates. However, after attempting > to perform the following query (carriage returns intentional): > > update NIELSONJ.MYTABLE set COLUMN_1 = '"double quotes" > ''single quotes'' > En - dash > Em-dash > . bullet > ' where COLUMN_2 = -2395 > > > I get the following error: > > cx_Oracle.InterfaceError: not a query > > > I've copied and pasted the query into my IDE, executed it, and it runs just > fine. It's definitely a query! I am mystified. > > Please note what kinds of quotes those are and that all single quotes within > the query are doubled to avoid terminating the update string. The script is > intended to cleanse the database of data containing weird characters like > smart quotes (e.g. left single quotes are replaced with straight single > quotes). > > -- > John Nielson > mr....@gm... > (504) 344.7225 > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today. > http://p.sf.net/sfu/beautyoftheweb > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |