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

Milt Epstein <mepstein-nzINlOoChub2fBVCVOL8/[email protected]>
Newsgroups gmane.comp.python.db.cx-oracle
Message-ID <[email protected]>
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)
mepstein-nzINlOoChub2fBVCVOL8/[email protected]

------------------------------------------------------------------------------
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
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.