cx-oracle-users Mailing List for cx_Oracle (Page 14)
Brought to you by:
atuining
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
(9) |
Sep
(8) |
Oct
(12) |
Nov
(4) |
Dec
(8) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(15) |
Feb
(12) |
Mar
(11) |
Apr
(5) |
May
(7) |
Jun
(8) |
Jul
(12) |
Aug
(2) |
Sep
(14) |
Oct
(17) |
Nov
(20) |
Dec
(3) |
2005 |
Jan
(16) |
Feb
(9) |
Mar
(22) |
Apr
(21) |
May
(73) |
Jun
(16) |
Jul
(15) |
Aug
(10) |
Sep
(32) |
Oct
(35) |
Nov
(22) |
Dec
(13) |
2006 |
Jan
(42) |
Feb
(36) |
Mar
(13) |
Apr
(18) |
May
(8) |
Jun
(17) |
Jul
(24) |
Aug
(30) |
Sep
(35) |
Oct
(33) |
Nov
(33) |
Dec
(11) |
2007 |
Jan
(35) |
Feb
(31) |
Mar
(35) |
Apr
(64) |
May
(38) |
Jun
(12) |
Jul
(18) |
Aug
(34) |
Sep
(75) |
Oct
(29) |
Nov
(51) |
Dec
(11) |
2008 |
Jan
(27) |
Feb
(46) |
Mar
(48) |
Apr
(36) |
May
(59) |
Jun
(42) |
Jul
(25) |
Aug
(34) |
Sep
(57) |
Oct
(97) |
Nov
(59) |
Dec
(57) |
2009 |
Jan
(48) |
Feb
(48) |
Mar
(45) |
Apr
(24) |
May
(46) |
Jun
(52) |
Jul
(52) |
Aug
(37) |
Sep
(27) |
Oct
(40) |
Nov
(37) |
Dec
(13) |
2010 |
Jan
(16) |
Feb
(9) |
Mar
(24) |
Apr
(6) |
May
(27) |
Jun
(28) |
Jul
(60) |
Aug
(16) |
Sep
(33) |
Oct
(20) |
Nov
(39) |
Dec
(30) |
2011 |
Jan
(23) |
Feb
(43) |
Mar
(16) |
Apr
(29) |
May
(23) |
Jun
(16) |
Jul
(10) |
Aug
(8) |
Sep
(18) |
Oct
(42) |
Nov
(26) |
Dec
(20) |
2012 |
Jan
(17) |
Feb
(27) |
Mar
|
Apr
(20) |
May
(18) |
Jun
(7) |
Jul
(24) |
Aug
(21) |
Sep
(23) |
Oct
(18) |
Nov
(12) |
Dec
(5) |
2013 |
Jan
(14) |
Feb
(10) |
Mar
(20) |
Apr
(65) |
May
(3) |
Jun
(8) |
Jul
(6) |
Aug
(3) |
Sep
|
Oct
(3) |
Nov
(28) |
Dec
(3) |
2014 |
Jan
(3) |
Feb
(9) |
Mar
(4) |
Apr
(7) |
May
(20) |
Jun
(2) |
Jul
(20) |
Aug
(7) |
Sep
(11) |
Oct
(8) |
Nov
(6) |
Dec
(12) |
2015 |
Jan
(16) |
Feb
(10) |
Mar
(14) |
Apr
(8) |
May
|
Jun
(8) |
Jul
(15) |
Aug
(7) |
Sep
(1) |
Oct
(33) |
Nov
(8) |
Dec
(5) |
2016 |
Jan
(18) |
Feb
(12) |
Mar
(6) |
Apr
(14) |
May
(5) |
Jun
(3) |
Jul
|
Aug
(21) |
Sep
|
Oct
(15) |
Nov
(8) |
Dec
|
2017 |
Jan
|
Feb
(14) |
Mar
(21) |
Apr
(9) |
May
(6) |
Jun
(11) |
Jul
(23) |
Aug
(6) |
Sep
(5) |
Oct
(7) |
Nov
(1) |
Dec
(1) |
2018 |
Jan
|
Feb
|
Mar
(16) |
Apr
(2) |
May
(1) |
Jun
|
Jul
(2) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2019 |
Jan
(2) |
Feb
(3) |
Mar
(1) |
Apr
(1) |
May
|
Jun
|
Jul
(2) |
Aug
(1) |
Sep
(2) |
Oct
|
Nov
|
Dec
(1) |
2020 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
(2) |
Jun
(1) |
Jul
(4) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(3) |
2021 |
Jan
|
Feb
(5) |
Mar
|
Apr
(7) |
May
(6) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Till F. <til...@t-...> - 2015-08-01 18:21:07
|
Hello, For security my client uses oracle wallet technology to store the connection credentials. Cx-Oracle 'Connection' objects work nicely when given the '/@tns' string with empty user/password and tns referencing a wallet entry, but I can not get a 'SessionPool' object this way it seems - what are the correct arguments to SessionPool in this case? Best regards Till. |
From: Christopher J. <chr...@or...> - 2015-08-01 00:45:48
|
On 30/07/2015 7:44 am, Mike Bayer wrote: > > > On 7/28/15 11:33 PM, Christopher Jones wrote: >> >> Is it still an issue? I can see comments "That did it" and "Glad it >> worked out" in the SQLAlchemy thread - was that a resolution with 5.2 >> or from reverting to 5.1.3? >> >> If it's still an issue, then post a currently reproducible test case & >> the SQL to create the schema. Knowing Oracle client library & DB >> version numbers, as well as platform and environment settings, >> including NLS values would help. > So the issue is that cx_Oracle 5.2 added a type called "UNICODE", which we specifically looked for it being absent in order to detect whether or not > the library is using "unicode mode", which is a legacy py2K mode introduced in early cx_Oracle 5 versions. Because 5.2 adds this, we'd get the > impression we were *not* in unicode mode and we'd not correctly set our "convert unicode" flags for py3K. All the b'' strings we see in these logs are > *incorrect* - SQLAlchemy should be sending these as Python unicode objects, and that's what we did for 5.1.3. > > So issue resolved, thanks for all the help ! Thanks for the clarification. Chris -- http://twitter.com/ghrd |
From: Mike B. <mi...@zz...> - 2015-07-29 21:45:35
|
On 7/28/15 11:33 PM, Christopher Jones wrote: > > Is it still an issue? I can see comments "That did it" and "Glad it > worked out" in the SQLAlchemy thread - was that a resolution with 5.2 > or from reverting to 5.1.3? > > If it's still an issue, then post a currently reproducible test case & > the SQL to create the schema. Knowing Oracle client library & DB > version numbers, as well as platform and environment settings, > including NLS values would help. So the issue is that cx_Oracle 5.2 added a type called "UNICODE", which we specifically looked for it being absent in order to detect whether or not the library is using "unicode mode", which is a legacy py2K mode introduced in early cx_Oracle 5 versions. Because 5.2 adds this, we'd get the impression we were *not* in unicode mode and we'd not correctly set our "convert unicode" flags for py3K. All the b'' strings we see in these logs are *incorrect* - SQLAlchemy should be sending these as Python unicode objects, and that's what we did for 5.1.3. So issue resolved, thanks for all the help ! > > Chris > > On 29/07/2015 4:11 am, Mike Bayer wrote: >> OK, to continue this, I have *more* users reporting issues with >> cx_Oracle 5.2 on Python 3 which disappear when they downgrade to 5.1.3. >> At this point I am expecting many more user issues with cx_Oracle 5.2, >> as whether it has something to do with build mis-matches or what, it is >> either a mistake that is suddenly very easy to make by an end user, >> something SQLAlchemy is doing which is suddenly not compatible with >> cx_Oracle 5.2, or a bug in cx_Oracle itself. >> >> For this user, he is receiving random "cannot insert NULL into <some >> schema / table / column>" errors, where the column is different each >> time. Log output of SQL emitted again shows it emitted as bytestrings >> and the values are definitely present. >> >> This user's log output can be seen in the thread at >> https://groups.google.com/forum/#!topic/sqlalchemy/OTwV1GZwgQo. >> >> Again, if a cx_Oracle developer could come up with a concrete reason why >> these different-seeming errors are suddenly appearing, that would be >> helpful. >> >> >> >> On 7/23/15 9:43 PM, Mike Bayer wrote: >>> >>> On 7/23/15 4:06 PM, Shai Berger wrote: >>>> On Thursday 23 July 2015 04:13:20 Mike Bayer wrote: >>>>> https://bitbucket.org/zzzeek/sqlalchemy/issues/3491/queryfirst-sometimes-returns-none >>>>> >>>>> >>>> The user is running on Windows with Oracle 11.1 client. The first >>>> question >>>> that comes to mind is, did they compile cx_Oracle themselves? If not, >>>> perhaps the issue is caused by running a cx_Oracle compiled against >>>> Oracle 11.2 client libs, against a 11.1 client installation? >>>> >>>> AFAIK you can no longer download 11.1 from Oracle, that version >>>> has been EOL'd I think. >>> great catch! I've asked the user for more information, but if I don't >>> get a response I'll likely close the issue based on lack of >>> information. >>> >>> >>> >>> >>>> Shai. >>>> >>>> ------------------------------------------------------------------------------ >>>> >>>> _______________________________________________ >>>> cx-oracle-users mailing list >>>> cx-...@li... >>>> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >>> >>> ------------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> cx-oracle-users mailing list >>> cx-...@li... >>> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> > |
From: Christopher J. <chr...@or...> - 2015-07-29 03:33:33
|
Is it still an issue? I can see comments "That did it" and "Glad it worked out" in the SQLAlchemy thread - was that a resolution with 5.2 or from reverting to 5.1.3? If it's still an issue, then post a currently reproducible test case & the SQL to create the schema. Knowing Oracle client library & DB version numbers, as well as platform and environment settings, including NLS values would help. Chris On 29/07/2015 4:11 am, Mike Bayer wrote: > OK, to continue this, I have *more* users reporting issues with > cx_Oracle 5.2 on Python 3 which disappear when they downgrade to 5.1.3. > At this point I am expecting many more user issues with cx_Oracle 5.2, > as whether it has something to do with build mis-matches or what, it is > either a mistake that is suddenly very easy to make by an end user, > something SQLAlchemy is doing which is suddenly not compatible with > cx_Oracle 5.2, or a bug in cx_Oracle itself. > > For this user, he is receiving random "cannot insert NULL into <some > schema / table / column>" errors, where the column is different each > time. Log output of SQL emitted again shows it emitted as bytestrings > and the values are definitely present. > > This user's log output can be seen in the thread at > https://groups.google.com/forum/#!topic/sqlalchemy/OTwV1GZwgQo. > > Again, if a cx_Oracle developer could come up with a concrete reason why > these different-seeming errors are suddenly appearing, that would be > helpful. > > > > On 7/23/15 9:43 PM, Mike Bayer wrote: >> >> On 7/23/15 4:06 PM, Shai Berger wrote: >>> On Thursday 23 July 2015 04:13:20 Mike Bayer wrote: >>>> https://bitbucket.org/zzzeek/sqlalchemy/issues/3491/queryfirst-sometimes-returns-none >>>> >>> The user is running on Windows with Oracle 11.1 client. The first question >>> that comes to mind is, did they compile cx_Oracle themselves? If not, >>> perhaps the issue is caused by running a cx_Oracle compiled against >>> Oracle 11.2 client libs, against a 11.1 client installation? >>> >>> AFAIK you can no longer download 11.1 from Oracle, that version >>> has been EOL'd I think. >> great catch! I've asked the user for more information, but if I don't >> get a response I'll likely close the issue based on lack of information. >> >> >> >> >>> Shai. >>> >>> ------------------------------------------------------------------------------ >>> _______________________________________________ >>> cx-oracle-users mailing list >>> cx-...@li... >>> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> >> ------------------------------------------------------------------------------ >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > ------------------------------------------------------------------------------ > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > -- http://twitter.com/ghrd <# |
From: Mike B. <mi...@zz...> - 2015-07-28 18:11:32
|
OK, to continue this, I have *more* users reporting issues with cx_Oracle 5.2 on Python 3 which disappear when they downgrade to 5.1.3. At this point I am expecting many more user issues with cx_Oracle 5.2, as whether it has something to do with build mis-matches or what, it is either a mistake that is suddenly very easy to make by an end user, something SQLAlchemy is doing which is suddenly not compatible with cx_Oracle 5.2, or a bug in cx_Oracle itself. For this user, he is receiving random "cannot insert NULL into <some schema / table / column>" errors, where the column is different each time. Log output of SQL emitted again shows it emitted as bytestrings and the values are definitely present. This user's log output can be seen in the thread at https://groups.google.com/forum/#!topic/sqlalchemy/OTwV1GZwgQo. Again, if a cx_Oracle developer could come up with a concrete reason why these different-seeming errors are suddenly appearing, that would be helpful. On 7/23/15 9:43 PM, Mike Bayer wrote: > > On 7/23/15 4:06 PM, Shai Berger wrote: >> On Thursday 23 July 2015 04:13:20 Mike Bayer wrote: >>> https://bitbucket.org/zzzeek/sqlalchemy/issues/3491/queryfirst-sometimes-returns-none >>> >> The user is running on Windows with Oracle 11.1 client. The first question >> that comes to mind is, did they compile cx_Oracle themselves? If not, >> perhaps the issue is caused by running a cx_Oracle compiled against >> Oracle 11.2 client libs, against a 11.1 client installation? >> >> AFAIK you can no longer download 11.1 from Oracle, that version >> has been EOL'd I think. > great catch! I've asked the user for more information, but if I don't > get a response I'll likely close the issue based on lack of information. > > > > >> Shai. >> >> ------------------------------------------------------------------------------ >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > ------------------------------------------------------------------------------ > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |
From: vijchti <rch...@gm...> - 2015-07-27 21:10:34
|
Okay, we've compiled our own version of 5.2 and continue to experience the original issue. Any other ideas? |
From: vijchti <rch...@gm...> - 2015-07-27 20:35:16
|
Shai Berger <shai@...> writes: > > On Thursday 23 July 2015 04:13:20 Mike Bayer wrote: > > > > https://bitbucket.org/zzzeek/sqlalchemy/issues/3491/queryfirst- sometimes-returns-none > > > The user is running on Windows with Oracle 11.1 client. The first question > that comes to mind is, did they compile cx_Oracle themselves? If not, > perhaps the issue is caused by running a cx_Oracle compiled against > Oracle 11.2 client libs, against a 11.1 client installation? > > AFAIK you can no longer download 11.1 from Oracle, that version > has been EOL'd I think. > > Shai. > > ---------------------------------------------------------------------- -------- > Hello Shai, I'm the SA user that originally reported this issue. We did not compile cx_Oracle ourselves. Instead, we used the precompiled version available on PyPI here: https://pypi.python.org/packages/3.4/c/cx_Oracle/cx_Oracle-5.2- 11g.win32-py3.4.exe#md5=63137306c4fd292438a693dbce0a801d The replacement version was also downloaded from PyPI: https://pypi.python.org/packages/3.4/c/cx_Oracle/cx_Oracle-5.1.3- 11g.win32-py3.4.exe#md5=1b8438c3b61bc2c026bcff219a9c0214 We'll compile our own version for testing and let you know the results. Vijchti |
From: avinash n. <avi...@or...> - 2015-07-24 15:11:00
|
Hello Zoltan, I am not able to reproduce this problem in my setup. (5.2 and Linux with py3 and 2). Here is my script. /import cx_Oracle, time// //con = cx_Oracle.connect("scott/tiger@inst1")// //con.module="query module"// //con.action="dual query"// //cur = con.cursor()// //#cur.execute("select * from emp")// //time.sleep(3) # delay a little// //# now let's supply a new module and action// //con.module="2-query module"// //con.action="2-dual query"// //cur = con.cursor()// //cur.execute("BEGIN GREETINGS(); END;")// // Long query //con.module="3-query module"// // //con.close()/ Can you try an cur.execute() or con.ping() call between the two calls to see if it fixes the problem. Best Regards, Avinash On 7/16/2015 7:29 PM, Zoltan Fedor wrote: > Hi, > I'm having a hard time using connection.action > > I'm a long-time PHP OCI user and just switching over to cx_Oracle. I > always thought that the "action" attribute of the Oracle session is > there to show what action the current query is making, so I always > used it to basically provide a short verbal explanation of what the > query is doing. This is specially useful for ETL-style, long running > queries, so the DBA can see what that query is doing which is running > for over 30 mins now, so he won't just kill it. > > In line with this, in PHP OCI I can have an oracle connection open and > overwrite the "action" attribute everytime a submit a new query (hence > it can be used to describe what the query is doing). > > Unfortunately it seems to me that in cx_Oracle the "connection.action" > (and "connection.module") can only be submitted once and not > overwritten later. > > I'm using cx_Oracle 5.2 in Python 3.4.3 with Oracle 11.2.1 > > See below example code to reproduce. What you will see that while the > query is running the action (and module) in the Oracle $SESSION table > is showing the first value ("dual query") and NOT the second one > ("2-dual query"). > As such, I can only set the action once within a single Oracle > connection, which makes it useless for the purposes of explaining what > the query is doing, because you cannot set it for each query you are > running within the same connection (if you run only one query per > connection, then obviously this is a non-issue). > > /import cx_Oracle, time/ > /con = cx_Oracle.connect("user/password@//oracle_server:1521/test")/ > /con.module="query module"/ > /con.action="dual query"/ > /time.sleep(3) # delay a little/ > /# now let's supply a new module and action/ > /con.module="2-query module" / > /con.action="2-dual query" / > /cur = con.cursor()/ > /cur.execute("""/ > /RUN A QUERY HERE WHICH RUNS FOR LONG ENOUGH FOR YOU TO CHECK THE > SESSION DATA IN ORACLE""") > / > /con.close()/ > > > Would this be a bug or am I doing something wrong here? > > Thanks, > Zoltan > > > ------------------------------------------------------------------------------ > Don't Limit Your Business. Reach for the Cloud. > GigeNET's Cloud Solutions provide you with the tools and support that > you need to offload your IT needs and focus on growing your business. > Configured For All Businesses. Start Your Cloud Today. > https://www.gigenetcloud.com/ > > > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |
From: Mike B. <mi...@zz...> - 2015-07-24 01:43:37
|
On 7/23/15 4:06 PM, Shai Berger wrote: > On Thursday 23 July 2015 04:13:20 Mike Bayer wrote: >> https://bitbucket.org/zzzeek/sqlalchemy/issues/3491/queryfirst-sometimes-returns-none >> > The user is running on Windows with Oracle 11.1 client. The first question > that comes to mind is, did they compile cx_Oracle themselves? If not, > perhaps the issue is caused by running a cx_Oracle compiled against > Oracle 11.2 client libs, against a 11.1 client installation? > > AFAIK you can no longer download 11.1 from Oracle, that version > has been EOL'd I think. great catch! I've asked the user for more information, but if I don't get a response I'll likely close the issue based on lack of information. > > Shai. > > ------------------------------------------------------------------------------ > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |
From: Shai B. <sh...@pl...> - 2015-07-23 20:06:34
|
On Thursday 23 July 2015 04:13:20 Mike Bayer wrote: > > https://bitbucket.org/zzzeek/sqlalchemy/issues/3491/queryfirst-sometimes-returns-none > The user is running on Windows with Oracle 11.1 client. The first question that comes to mind is, did they compile cx_Oracle themselves? If not, perhaps the issue is caused by running a cx_Oracle compiled against Oracle 11.2 client libs, against a 11.1 client installation? AFAIK you can no longer download 11.1 from Oracle, that version has been EOL'd I think. Shai. |
From: Mike B. <mi...@zz...> - 2015-07-23 19:41:57
|
On 7/23/15 12:24 PM, Doug Henderson wrote: > Try changing your test case to use a byte string instead of a unicode > string. Change > > cursor = session.execute('SELECT "SCHEMA_lot_lot_key", > "SCHEMA_lot_lot_id" \nFROM (SELECT "SCHEMA".lot.lot_key AS > "SCHEMA_lot_lot_key", "SCHEMA".lot.lot_id AS "SCHEMA_lot_lot_id" > \nFROM "SCHEMA".lot) \nWHERE ROWNUM <= :param_1', {'param_1':1}) > > to > > cursor = session.execute(b'SELECT "SCHEMA_lot_lot_key", > "SCHEMA_lot_lot_id" \nFROM (SELECT "SCHEMA".lot.lot_key AS > "SCHEMA_lot_lot_key", "SCHEMA".lot.lot_id AS "SCHEMA_lot_lot_id" > \nFROM "SCHEMA".lot) \nWHERE ROWNUM <= :param_1', {b'param_1':1} > > > I suspect you may have a problem with mixing unicode and byte strings. > You don't mention which Python version you use but the string prefix > suggests you are using 3.x. Are you using a recent version, e.g. 3.4? > > Note that the log does not show the results of the SA internal queries > that try to find out how strings are returned. Hi Doug - Thanks very much for responding. I should note that this is not my own test environment and I can't reproduce it with any Oracle environment I have access to. I'm channeling one of my users who I think has just downgraded to cx_oracle 5.1.3 to solve the issue and may or may not still be paying attention (I will ping), but if you look at the logs the user posted you can see that we are sending bytestring based queries along and by the presence of the "b''" you know this is Python 3 at least (and likely 3.3 or 3.4). That is, SQLAlchemy is encountering this error using the latter form you've posted. Below are logs posted by this user where the failure of a row to be returned is present. In SQLAlchemy, when you see queries sent as b'', that means the flag "supports_unicode_statements" is set to False on the dialect, which may or may not be the right choice for cx_oracle on Python 3, though in our own test suite we pass our suite 100% with this flag set to False for cx_oracle + py3k. The parameter key is also a bytestring. So in one case we have this: where we see the cursor.description comes back, but no rows: 2015-07-20 13:49:41,436 INFO sqlalchemy.engine.base.Engine b'SELECT USER FROM DUAL' 2015-07-20 13:49:41,437 INFO sqlalchemy.engine.base.Engine {} 2015-07-20 13:49:41,438 DEBUG sqlalchemy.engine.base.Engine Col ('USER',) 2015-07-20 13:49:41,439 DEBUG sqlalchemy.engine.base.Engine Row ('DPUSER',) 2015-07-20 13:49:41,439 INFO sqlalchemy.engine.base.Engine SELECT CAST('test plain returns' AS VARCHAR(60 CHAR)) AS anon_1 FROM DUAL 2015-07-20 13:49:41,439 INFO sqlalchemy.engine.base.Engine {} 2015-07-20 13:49:41,440 INFO sqlalchemy.engine.base.Engine SELECT CAST('test unicode returns' AS NVARCHAR2(60)) AS anon_1 FROM DUAL 2015-07-20 13:49:41,440 INFO sqlalchemy.engine.base.Engine {} 2015-07-20 13:49:41,443 INFO sqlalchemy.engine.base.Engine BEGIN (implicit) 2015-07-20 13:49:41,444 INFO sqlalchemy.engine.base.Engine b'SELECT "SCHEMA_lot_lot_key", "SCHEMA_lot_lot_id" \nFROM (SELECT "SCHEMA".lot.lot_key AS "SCHEMA_lot_lot_key", "SCHEMA".lot.lot_id AS "SCHEMA_lot_lot_id" \nFROM "SCHEMA".lot) \nWHERE ROWNUM <= :param_1' 2015-07-20 13:49:41,444 INFO sqlalchemy.engine.base.Engine {b'param_1': 1} 2015-07-20 13:49:41,445 DEBUG sqlalchemy.engine.base.Engine Col ('SCHEMA_lot_lot_key', 'SCHEMA_lot_lot_id') the user also pastes the identical series of steps on a different run, however there *is* a result. The user observes that whether or not a result is returned is a 50% random decision. If they downgrade to cx_oracle 5.1.3, the failures disappear: 2015-07-20 13:52:27,579 INFO sqlalchemy.engine.base.Engine b'SELECT USER FROM DUAL' 2015-07-20 13:52:27,579 INFO sqlalchemy.engine.base.Engine {} 2015-07-20 13:52:27,580 DEBUG sqlalchemy.engine.base.Engine Col ('USER',) 2015-07-20 13:52:27,581 DEBUG sqlalchemy.engine.base.Engine Row ('DPUSER',) 2015-07-20 13:52:27,581 INFO sqlalchemy.engine.base.Engine SELECT CAST('test plain returns' AS VARCHAR(60 CHAR)) AS anon_1 FROM DUAL 2015-07-20 13:52:27,581 INFO sqlalchemy.engine.base.Engine {} 2015-07-20 13:52:27,583 INFO sqlalchemy.engine.base.Engine SELECT CAST('test unicode returns' AS NVARCHAR2(60)) AS anon_1 FROM DUAL 2015-07-20 13:52:27,583 INFO sqlalchemy.engine.base.Engine {} 2015-07-20 13:52:27,586 INFO sqlalchemy.engine.base.Engine BEGIN (implicit) 2015-07-20 13:52:27,587 INFO sqlalchemy.engine.base.Engine b'SELECT "SCHEMA_lot_lot_key", "SCHEMA_lot_lot_id" \nFROM (SELECT "SCHEMA".lot.lot_key AS "SCHEMA_lot_lot_key", "SCHEMA".lot.lot_id AS "SCHEMA_lot_lot_id" \nFROM "SCHEMA".lot) \nWHERE ROWNUM <= :param_1' 2015-07-20 13:52:27,587 INFO sqlalchemy.engine.base.Engine {b'param_1': 1} 2015-07-20 13:52:27,588 DEBUG sqlalchemy.engine.base.Engine Col ('SCHEMA_lot_lot_key', 'SCHEMA_lot_lot_id') 2015-07-20 13:52:27,588 DEBUG sqlalchemy.engine.base.Engine Row (1581, 'S9343.S') what would be most helpful here would be someone with very detailed knowledge of cx_oracle's changes between 5.1.3 and 5.2 which could in any way result in the result rows for a statement going missing. > > You mention trying older versions of SA, but have you tried newer versions? > > Do you env variable for LANG or LC_*? Also, is the Oracle server > version the same as the client version? You might also check the > values of the NLS character set parameters. > > Hope this helps. > Doug > > On 22 July 2015 at 19:13, Mike Bayer <mi...@zz...> wrote: >> >> On 6/20/15 11:40 PM, Anthony Tuininga wrote: >> >> What is cx_Oracle? >> >> cx_Oracle is a Python extension module that enables access to Oracle for >> Python 2.x and 3.x and conforms to the Python database API 2.0 >> specifications with a number of enhancements. >> >> >> Where do I get it? >> >> http://cx-oracle.sourceforge.net >> >> >> >> What's new? >> >> http://cx-oracle.readthedocs.org/en/latest/releasenotes.html >> >> >> One of my users is seeing issues with SQL result sets returning zero rows >> when upgrading to cx_Oracle 5.2 from 5.1.3. Unfortunately we don't have a >> simple reproduction case, and it also involves SQLAlchemy which I know rules >> out it being a simple test case for cx_Oracle developers. However, I'm >> hoping that some other cx_Oracle users eventually can confirm some similar >> issue to shed some light on it, so consider this post to be at least a flag >> that something has changed for at least one user: >> >> https://bitbucket.org/zzzeek/sqlalchemy/issues/3491/queryfirst-sometimes-returns-none >> >> >> >> >> >> ------------------------------------------------------------------------------ >> >> >> >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> > > |
From: Doug H. <djn...@gm...> - 2015-07-23 18:04:18
|
Try changing your test case to use a byte string instead of a unicode string. Change cursor = session.execute('SELECT "SCHEMA_lot_lot_key", "SCHEMA_lot_lot_id" \nFROM (SELECT "SCHEMA".lot.lot_key AS "SCHEMA_lot_lot_key", "SCHEMA".lot.lot_id AS "SCHEMA_lot_lot_id" \nFROM "SCHEMA".lot) \nWHERE ROWNUM <= :param_1', {'param_1':1}) to cursor = session.execute(b'SELECT "SCHEMA_lot_lot_key", "SCHEMA_lot_lot_id" \nFROM (SELECT "SCHEMA".lot.lot_key AS "SCHEMA_lot_lot_key", "SCHEMA".lot.lot_id AS "SCHEMA_lot_lot_id" \nFROM "SCHEMA".lot) \nWHERE ROWNUM <= :param_1', {b'param_1':1} I suspect you may have a problem with mixing unicode and byte strings. You don't mention which Python version you use but the string prefix suggests you are using 3.x. Are you using a recent version, e.g. 3.4? Note that the log does not show the results of the SA internal queries that try to find out how strings are returned. You mention trying older versions of SA, but have you tried newer versions? Do you env variable for LANG or LC_*? Also, is the Oracle server version the same as the client version? You might also check the values of the NLS character set parameters. Hope this helps. Doug On 22 July 2015 at 19:13, Mike Bayer <mi...@zz...> wrote: > > > On 6/20/15 11:40 PM, Anthony Tuininga wrote: > > What is cx_Oracle? > > cx_Oracle is a Python extension module that enables access to Oracle for > Python 2.x and 3.x and conforms to the Python database API 2.0 > specifications with a number of enhancements. > > > Where do I get it? > > http://cx-oracle.sourceforge.net > > > > What's new? > > http://cx-oracle.readthedocs.org/en/latest/releasenotes.html > > > One of my users is seeing issues with SQL result sets returning zero rows > when upgrading to cx_Oracle 5.2 from 5.1.3. Unfortunately we don't have a > simple reproduction case, and it also involves SQLAlchemy which I know rules > out it being a simple test case for cx_Oracle developers. However, I'm > hoping that some other cx_Oracle users eventually can confirm some similar > issue to shed some light on it, so consider this post to be at least a flag > that something has changed for at least one user: > > https://bitbucket.org/zzzeek/sqlalchemy/issues/3491/queryfirst-sometimes-returns-none > > > > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > -- Doug Henderson, Calgary, Alberta, Canada |
From: William W. L. K. <wil...@gm...> - 2015-07-23 17:35:10
|
I have managed to reproduce that accidentally while working on one of my projects. [root@POC-DB]# python Python 2.6.6 (r266:84292, Apr 11 2011, 15:50:32) [GCC 4.4.4 20100726 (Red Hat 4.4.4-13)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import cx_Oracle >>> connection = cx_Oracle.connect("oracle/oracle@poc-db") >>> cursor = connection.cursor() ... ... ... >>> cursor.execute(str(my_query1)) <cx_Oracle.Cursor on <cx_Oracle.Connection to oracle@poc-db>> >>> cnum_check1 = cursor.fetchall()[0][0] Traceback (most recent call last): File "<stdin>", line 1, in <module> IndexError: list index out of range >>> Please advise. Will On Thu, Jul 23, 2015 at 9:13 AM, Mike Bayer <mi...@zz...> wrote: > > > On 6/20/15 11:40 PM, Anthony Tuininga wrote: > > What is cx_Oracle? > cx_Oracle is a Python extension module that enables access to Oracle for Python 2.x and 3.x and conforms to the Python database API 2.0 specifications with a number of enhancements. > > > Where do I get it? > http://cx-oracle.sourceforge.net > > > > What's new? > > http://cx-oracle.readthedocs.org/en/latest/releasenotes.html > > > One of my users is seeing issues with SQL result sets returning zero rows > when upgrading to cx_Oracle 5.2 from 5.1.3. Unfortunately we don't have a > simple reproduction case, and it also involves SQLAlchemy which I know > rules out it being a simple test case for cx_Oracle developers. However, > I'm hoping that some other cx_Oracle users eventually can confirm some > similar issue to shed some light on it, so consider this post to be at > least a flag that something has changed for at least one user: > > > https://bitbucket.org/zzzeek/sqlalchemy/issues/3491/queryfirst-sometimes-returns-none > > > > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > cx-oracle-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |
From: Mike B. <mi...@zz...> - 2015-07-23 01:13:30
|
On 6/20/15 11:40 PM, Anthony Tuininga wrote: > What iscx_Oracle? > > cx_Oracle is a Python extension module that enables access to Oracle for Python 2.x and3.x and conforms to the Python database API 2.0 specifications with a number of enhancements. > > > Where do I get it? > > http://cx-oracle.sourceforge.net <http://cx-oracle.sourceforge.net/> > > > What's new? > > http://cx-oracle.readthedocs.org/en/latest/releasenotes.html One of my users is seeing issues with SQL result sets returning zero rows when upgrading to cx_Oracle 5.2 from 5.1.3. Unfortunately we don't have a simple reproduction case, and it also involves SQLAlchemy which I know rules out it being a simple test case for cx_Oracle developers. However, I'm hoping that some other cx_Oracle users eventually can confirm some similar issue to shed some light on it, so consider this post to be at least a flag that something has changed for at least one user: https://bitbucket.org/zzzeek/sqlalchemy/issues/3491/queryfirst-sometimes-returns-none > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |
From: Zoltan F. <zol...@gm...> - 2015-07-16 13:59:57
|
Hi, I'm having a hard time using connection.action I'm a long-time PHP OCI user and just switching over to cx_Oracle. I always thought that the "action" attribute of the Oracle session is there to show what action the current query is making, so I always used it to basically provide a short verbal explanation of what the query is doing. This is specially useful for ETL-style, long running queries, so the DBA can see what that query is doing which is running for over 30 mins now, so he won't just kill it. In line with this, in PHP OCI I can have an oracle connection open and overwrite the "action" attribute everytime a submit a new query (hence it can be used to describe what the query is doing). Unfortunately it seems to me that in cx_Oracle the "connection.action" (and "connection.module") can only be submitted once and not overwritten later. I'm using cx_Oracle 5.2 in Python 3.4.3 with Oracle 11.2.1 See below example code to reproduce. What you will see that while the query is running the action (and module) in the Oracle $SESSION table is showing the first value ("dual query") and NOT the second one ("2-dual query"). As such, I can only set the action once within a single Oracle connection, which makes it useless for the purposes of explaining what the query is doing, because you cannot set it for each query you are running within the same connection (if you run only one query per connection, then obviously this is a non-issue). *import cx_Oracle, time* *con = cx_Oracle.connect("user/password@//oracle_server:1521/test")* *con.module="query module"* *con.action="dual query"* *time.sleep(3) # delay a little* *# now let's supply a new module and action* *con.module="2-query module" * *con.action="2-dual query" * *cur = con.cursor()* *cur.execute("""* *RUN A QUERY HERE WHICH RUNS FOR LONG ENOUGH FOR YOU TO CHECK THE SESSION DATA IN ORACLE""")* *con.close()* Would this be a bug or am I doing something wrong here? Thanks, Zoltan |
From: Shai B. <sh...@pl...> - 2015-07-07 22:49:47
|
On Monday 06 July 2015 17:37:33 Kru...@we... wrote: > I'm having an issue with using the cx_Oracle module - I can use/import it > with the python command line, but for some reason I can't import it into > PyCharm. I keep getting that the module does not exist. The cx_Oracle.pyd > file is in the python path, so not sure what the issue is. Any ideas? .pyd -- so you're on Windows, right? Does pycharm run with the right Oracle environment settings? Are Oracle dlls in the PATH? |
From: <Kru...@we...> - 2015-07-06 18:14:18
|
I'm having an issue with using the cx_Oracle module - I can use/import it with the python command line, but for some reason I can't import it into PyCharm. I keep getting that the module does not exist. The cx_Oracle.pyd file is in the python path, so not sure what the issue is. Any ideas? |
From: Christopher J. <chr...@or...> - 2015-06-22 19:56:16
|
On 6/20/15 8:40 PM, Anthony Tuininga wrote: > What iscx_Oracle? > > cx_Oracle is a Python extension module that enables access to Oracle > for Python 2.x and3.x and conforms to the Python database API 2.0 > specifications with a number of enhancements. > > Where do I get it? > > http://cx-oracle.sourceforge.net <http://cx-oracle.sourceforge.net/> > > What's new? > > http://cx-oracle.readthedocs.org/en/latest/releasenotes.html Thank you Anthony! Also thanks to Avinash @ Oracle and to all the other contributors and users of cx_Oracle. Chris -- http://twitter.com/ghrd |
From: Anthony T. <ant...@gm...> - 2015-06-21 03:40:12
|
What is cx_Oracle? cx_Oracle is a Python extension module that enables access to Oracle for Python 2.x and 3.x and conforms to the Python database API 2.0 specifications with a number of enhancements. Where do I get it? http://cx-oracle.sourceforge.net What's new? http://cx-oracle.readthedocs.org/en/latest/releasenotes.html |
From: Shai B. <sh...@pl...> - 2015-06-09 22:50:04
|
I work with Oracle almost exclusively through cx_oracle, and it's been hit- and-miss with using reserved words as names. Sometimes quoting them works, sometimes it doesn't. Haven't researched it to find more accurate descriptions. Glad your problem is solved, Shai. On Wednesday 10 June 2015 01:38:43 Jay wrote: > Hah! That was it. I didn't realize UID was a reserved word. Porting > from MySQL to Oracle, and it didn't occur to me that UID would be reserved > in Oracle. > > I suspect there's something in Python that treats UID differently as a > reserved word. I did have to quote it in all other clients, so EMPLID "UID" > so perhaps they handle the quoted differently or something. Not sure. > > Anyhow, thanks for the pointer. (: > > -= Jay =- > > On Tue, Jun 9, 2015 at 4:02 PM, Shai Berger <sh...@pl...> wrote: > > I suspect this is because UID is a reserved word. > > > > That does not explain why the query would work on plsql or perl and not > > with > > Python; but see if it works with a different name, say "UIZ". > > > > HTH, > > > > Shai. > > > > On Wednesday 10 June 2015 00:50:56 Jay wrote: > > > Yes, > > > > > > It also results in "cx_Oracle.DatabaseError: ORA-00923: FROM > > > keyword > > > > > > not found where expected" > > > > > > I know when I run the command from plsql, or perl, I can quote the > > > > > > Alias "UID" and the query works as expected. But I've tried every way I > > > > can > > > > > find on the Internet of quoting a string to Oracle with Python, and > > > none > > > > of > > > > > it seems to work. for some reason, python just refuses to pass that > > > > string > > > > > to Oracle as a quoted value it would seem. > > > > > > -= Jay =- > > > > > > > > > On Tue, Jun 9, 2015 at 3:27 PM, Fawcett, David (MNIT) < > > > > > > Dav...@st...> wrote: > > > > Have you tried > > > > > > > > 'SELECT EMPLID AS UID FROM TABLE WHERE EMPLID=:emplid' > > > > > > > > > > > > > > > > *From:* Jay [mailto:ja...@sc...] > > > > *Sent:* Tuesday, June 09, 2015 3:49 PM > > > > *To:* cx-...@li... > > > > *Subject:* [cx-oracle-users] How do you use Aliases? > > > > > > > > > > > > > > > > Trying to use an alias with cx_Oracle and nothing I'm trying seems to > > > > work: > > > > > > > > > > > > > > > > cursor.execute('SELECT EMPLID "UID" FROM TABLE WHERE EMPLID=:emplid', > > > > {'emplid':'123456'}): > > > > > > > > > > > > > > > > fails with: > > > > > > > > > > > > > > > > cx_Oracle.DatabaseError: ORA-00923: FROM keyword not found where > > > > expected > > > > > > I've tried every way I can find on the internets to quote/insert that > > > > Alias, but nothing seems to work. All I'm trying to do is alias > > > > EMPLID > > > > as > > > > > > UID. > > > > > > > > > > > > > > > > Is this just something that can't be done with this driver?? or > > > > Python? or?? > > > > > > > > > > > > > > > > -= Jay =- > > > > ------------------------------------------------------------------------- > > > > > > ----- > > > > > > > > _______________________________________________ > > > > cx-oracle-users mailing list > > > > cx-...@li... > > > > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > > ------------------------------------------------------------------------- > > ----- _______________________________________________ > > cx-oracle-users mailing list > > cx-...@li... > > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |
From: Jay <ja...@sc...> - 2015-06-09 22:38:51
|
Hah! That was it. I didn't realize UID was a reserved word. Porting from MySQL to Oracle, and it didn't occur to me that UID would be reserved in Oracle. I suspect there's something in Python that treats UID differently as a reserved word. I did have to quote it in all other clients, so EMPLID "UID" so perhaps they handle the quoted differently or something. Not sure. Anyhow, thanks for the pointer. (: -= Jay =- On Tue, Jun 9, 2015 at 4:02 PM, Shai Berger <sh...@pl...> wrote: > I suspect this is because UID is a reserved word. > > That does not explain why the query would work on plsql or perl and not > with > Python; but see if it works with a different name, say "UIZ". > > HTH, > Shai. > > On Wednesday 10 June 2015 00:50:56 Jay wrote: > > Yes, > > > > It also results in "cx_Oracle.DatabaseError: ORA-00923: FROM keyword > > not found where expected" > > > > I know when I run the command from plsql, or perl, I can quote the > > Alias "UID" and the query works as expected. But I've tried every way I > can > > find on the Internet of quoting a string to Oracle with Python, and none > of > > it seems to work. for some reason, python just refuses to pass that > string > > to Oracle as a quoted value it would seem. > > > > -= Jay =- > > > > > > On Tue, Jun 9, 2015 at 3:27 PM, Fawcett, David (MNIT) < > > > > Dav...@st...> wrote: > > > Have you tried > > > > > > 'SELECT EMPLID AS UID FROM TABLE WHERE EMPLID=:emplid' > > > > > > > > > > > > *From:* Jay [mailto:ja...@sc...] > > > *Sent:* Tuesday, June 09, 2015 3:49 PM > > > *To:* cx-...@li... > > > *Subject:* [cx-oracle-users] How do you use Aliases? > > > > > > > > > > > > Trying to use an alias with cx_Oracle and nothing I'm trying seems to > > > work: > > > > > > > > > > > > cursor.execute('SELECT EMPLID "UID" FROM TABLE WHERE EMPLID=:emplid', > > > {'emplid':'123456'}): > > > > > > > > > > > > fails with: > > > > > > > > > > > > cx_Oracle.DatabaseError: ORA-00923: FROM keyword not found where > expected > > > > > > > > > > > > I've tried every way I can find on the internets to quote/insert that > > > Alias, but nothing seems to work. All I'm trying to do is alias EMPLID > as > > > UID. > > > > > > > > > > > > Is this just something that can't be done with this driver?? or Python? > > > or?? > > > > > > > > > > > > -= Jay =- > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > ----- > > > > > > _______________________________________________ > > > cx-oracle-users mailing list > > > cx-...@li... > > > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > ------------------------------------------------------------------------------ > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Shai B. <sh...@pl...> - 2015-06-09 22:21:44
|
I suspect this is because UID is a reserved word. That does not explain why the query would work on plsql or perl and not with Python; but see if it works with a different name, say "UIZ". HTH, Shai. On Wednesday 10 June 2015 00:50:56 Jay wrote: > Yes, > > It also results in "cx_Oracle.DatabaseError: ORA-00923: FROM keyword > not found where expected" > > I know when I run the command from plsql, or perl, I can quote the > Alias "UID" and the query works as expected. But I've tried every way I can > find on the Internet of quoting a string to Oracle with Python, and none of > it seems to work. for some reason, python just refuses to pass that string > to Oracle as a quoted value it would seem. > > -= Jay =- > > > On Tue, Jun 9, 2015 at 3:27 PM, Fawcett, David (MNIT) < > > Dav...@st...> wrote: > > Have you tried > > > > 'SELECT EMPLID AS UID FROM TABLE WHERE EMPLID=:emplid' > > > > > > > > *From:* Jay [mailto:ja...@sc...] > > *Sent:* Tuesday, June 09, 2015 3:49 PM > > *To:* cx-...@li... > > *Subject:* [cx-oracle-users] How do you use Aliases? > > > > > > > > Trying to use an alias with cx_Oracle and nothing I'm trying seems to > > work: > > > > > > > > cursor.execute('SELECT EMPLID "UID" FROM TABLE WHERE EMPLID=:emplid', > > {'emplid':'123456'}): > > > > > > > > fails with: > > > > > > > > cx_Oracle.DatabaseError: ORA-00923: FROM keyword not found where expected > > > > > > > > I've tried every way I can find on the internets to quote/insert that > > Alias, but nothing seems to work. All I'm trying to do is alias EMPLID as > > UID. > > > > > > > > Is this just something that can't be done with this driver?? or Python? > > or?? > > > > > > > > -= Jay =- > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > ----- > > > > _______________________________________________ > > cx-oracle-users mailing list > > cx-...@li... > > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |
From: Jay <ja...@sc...> - 2015-06-09 21:51:04
|
Yes, It also results in "cx_Oracle.DatabaseError: ORA-00923: FROM keyword not found where expected" I know when I run the command from plsql, or perl, I can quote the Alias "UID" and the query works as expected. But I've tried every way I can find on the Internet of quoting a string to Oracle with Python, and none of it seems to work. for some reason, python just refuses to pass that string to Oracle as a quoted value it would seem. -= Jay =- On Tue, Jun 9, 2015 at 3:27 PM, Fawcett, David (MNIT) < Dav...@st...> wrote: > Have you tried > > > > 'SELECT EMPLID AS UID FROM TABLE WHERE EMPLID=:emplid' > > > > *From:* Jay [mailto:ja...@sc...] > *Sent:* Tuesday, June 09, 2015 3:49 PM > *To:* cx-...@li... > *Subject:* [cx-oracle-users] How do you use Aliases? > > > > Trying to use an alias with cx_Oracle and nothing I'm trying seems to work: > > > > cursor.execute('SELECT EMPLID "UID" FROM TABLE WHERE EMPLID=:emplid', > {'emplid':'123456'}): > > > > fails with: > > > > cx_Oracle.DatabaseError: ORA-00923: FROM keyword not found where expected > > > > I've tried every way I can find on the internets to quote/insert that > Alias, but nothing seems to work. All I'm trying to do is alias EMPLID as > UID. > > > > Is this just something that can't be done with this driver?? or Python? > or?? > > > > -= Jay =- > > > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |
From: Fawcett, D. (MNIT) <Dav...@st...> - 2015-06-09 21:42:25
|
Have you tried 'SELECT EMPLID AS UID FROM TABLE WHERE EMPLID=:emplid' From: Jay [mailto:ja...@sc...] Sent: Tuesday, June 09, 2015 3:49 PM To: cx-...@li... Subject: [cx-oracle-users] How do you use Aliases? Trying to use an alias with cx_Oracle and nothing I'm trying seems to work: cursor.execute('SELECT EMPLID "UID" FROM TABLE WHERE EMPLID=:emplid', {'emplid':'123456'}): fails with: cx_Oracle.DatabaseError: ORA-00923: FROM keyword not found where expected I've tried every way I can find on the internets to quote/insert that Alias, but nothing seems to work. All I'm trying to do is alias EMPLID as UID. Is this just something that can't be done with this driver?? or Python? or?? -= Jay =- |
From: Jay <ja...@sc...> - 2015-06-09 21:17:14
|
Trying to use an alias with cx_Oracle and nothing I'm trying seems to work: cursor.execute('SELECT EMPLID "UID" FROM TABLE WHERE EMPLID=:emplid', {'emplid':'123456'}): fails with: cx_Oracle.DatabaseError: ORA-00923: FROM keyword not found where expected I've tried every way I can find on the internets to quote/insert that Alias, but nothing seems to work. All I'm trying to do is alias EMPLID as UID. Is this just something that can't be done with this driver?? or Python? or?? -= Jay =- |