SQL Error when running Subquery on db2 10.1 -
SQL Error when running Subquery on db2 10.1 -
we trying set complex query birt in order study 'sum' 1 of values. generating sum using recursive cte.
the query have follows: 007 ctetasklist( 008 supervisorusername , 009 subordinateusername 010 ) as( 011 select 012 supervisorusername , 013 subordinateusername 014 015 dbro.subordinatelink 016 017 subordinateusername = ? 018 union select 019 s.supervisorusername , 020 s.subordinateusername 021 022 dbro.subordinatelink s , 023 ctetasklist t 024 025 s.supervisorusername = t.subordinateusername 026 ) select 027 ownerfullname , 028 totaltasks , 029 ( 030 select 031 sum(ta2.totaltasks) 032 033 ctetasklist cte bring together dbro.usertasktotal ta2 034 on ta2.ownerusername = cte.subordinateusername 035 ) sumta 036 037 dbro.usertasktotal ta 038 039 ownerusername = ?
our software versions are: birt: 2.6.1 db2: 10.1
the test info have guaranteed terminate (no infinite recursion).
the error getting sqlcode=-104, sqlstate=42601. parser marks '(' of sub query (line 29) unexpected character.
exact error message:
this query runs fine when run against database straight (using dbeaver, example). however, when paste birt, generates error message. know why happening or have way around problem? unfortunately, can't upgrade version of birt because part of different software product.
thank you.
sql db2 subquery birt
Comments
Post a Comment