Re: [cx-oracle-users] cursor.description, functions, and comments -- bug?
Brought to you by:
atuining
From: Milt E. <mep...@il...> - 2014-07-04 15:16:29
|
OK, I tried your alternatives, and with: 1. it had basically the same problem as the other comment style and 2. it worked, similarly as when I specified an alias with an "AS" (I mentioned this in my original note, but not so clearly) So, sounds like this is a known Oracle issue, and there are some workarounds. Thanks for your response! On Thu, 3 Jul 2014, Doug Henderson wrote: > On Thu, Jul 3, 2014 at 2:03 PM, Milt Epstein wrote: > > > ... > > SELECT ETL_CHAIN, max(COMPLETION_DT) > > -- SELECT * > > FROM ... > > ... > > > > ('ETL_CHAIN', <class 'cx_Oracle.STRING'>, 30, 30, 0, 0, 0) > > ('MAX(COMPLETION_DT)--SELECT*', <class 'cx_Oracle.DATETIME'>, 23, 7, 0, 0, > > 1) > > > > Two things to try to gain more understanding of the problem: > > 1. replace the "-- comment <NL>" with a "/* comment */" one. > > if you now see /* select **/ > (or some variation of it) in the column name you know it is > an oracle problem. > > 2. add a column alias, e.g. > /max(COMPLETION_DT)/ => /max(COMPLETION_DT) MAX_C_DT/ > > if you now see a column name of MAX_C_DT, you have solved the problem. > Always use a column alias when the column expression is not a legal > column name. > > > - Doug > > -- > Doug Henderson, Calgary, Alberta, Canada > Milt Epstein Applications Developer Graduate School of Library and Information Science (GSLIS) University of Illinois at Urbana-Champaign (UIUC) mep...@il... |