Re: cursor.description, functions, and comments -- bug?

Doug Henderson <[email protected]>
Newsgroups gmane.comp.python.db.cx-oracle
Message-ID <CAJ1FpuNjPRzo24HD8FZTK2WaN2oM_dy4f4=RE4GJZ-zwEZsmiA@mail.gmail.com>
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

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft

_______________________________________________
cx-oracle-users mailing list
cx-oracle-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/cx-oracle-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.