digglife / ibm-db

Automatically exported from code.google.com/p/ibm-db
0 stars 0 forks source link

Redundant key word 'RECURSIVE' For 'WITH' clause #171

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi 

We are trying to use 'WITH' clause to deal with situation of 'recursive' search 
according to below guide in db2

http://www-01.ibm.com/support/knowledgecenter/SSEPEK_10.0.0/com.ibm.db2z10.doc.a
psg/src/tpc/db2z_xmprecursivecte.dita

Different to other SQL (mysql, postgre), IBM DB2 does not support to have a key 
word 'RECURSIVE' after 'WITH'. However, current version of sqlalchemy generate 
this key word 'RECURSIVE', so in sqlalchemy we can notice DB2 throws error 
message like 'An unexpected token "included_parts" was found following "WITH 
RECURSIVE ".  Expected tokens may include:  "<space>".' 

This issue affected Oracle as well but SQLAlchemy owner fixed it in 
https://bitbucket.org/zzzeek/sqlalchemy/issue/3220. 

SQLAlchemy owner recommend me to contact you to fix this. Could you help?

Thanks in advance

What is the expected output? What do you see instead?
The sql state generated by sqlalchemy cte method does not have key word 
'RECURSIVE'

http://docs.sqlalchemy.org/en/rel_0_9/orm/query.html#sqlalchemy.orm.query.Query.
cte

What version of the product are you using? On what operating system?
0.3.0

Please provide any additional information below.

Original issue reported on code.google.com by godsarm...@gmail.com on 20 Mar 2015 at 3:01

GoogleCodeExporter commented 8 years ago
Thanks for reporting this issue, I going to take this issue. If any help 
required will ask you.

Original comment by rahul.pr...@in.ibm.com on 23 Mar 2015 at 6:22

GoogleCodeExporter commented 8 years ago
The fix is get committed with on github with 
https://github.com/ibmdb/python-ibmdbsa/commit/21c95393ae3a3151190e4d60f98fe2a83
e071eee 

Original comment by rahul.pr...@in.ibm.com on 22 Jul 2015 at 10:55