Re: [cx-oracle-users] cursor.description, functions, and comments -- bug?
Brought to you by:
atuining
From: Doug H. <djn...@gm...> - 2014-07-03 22:33:34
|
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 |