Error while executing query "Subquery is not a single column query; SQL statement:"
792 views
Skip to first unread message
Ramesh Elkaturi
unread,
Oct 5, 2016, 3:13:41 AM10/5/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to H2 Database
Hi All,
I have tried to execute below query then getting error as "Subquery is not a single column query; SQL statement:". When i execute same query on DB2..it is working fine. I have googled the error and found that H2 and Derby databases does not support this feature. Can any one have the solution/work around please share with me.
Query:
SELECT * FROM REPORTINFO WHERE (REPORTINFOID , VERSION ) IN (SELECT REPORTINFOID , MAX(VERSION ) AS VERSION FROM REPORTINFO WHERE DELETED =FALSE GROUP BY REPORTINFOID )
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to H2 Database
Hi all,
I tried to execute below query then it is returning error saying that "Subquery is not a single column query; SQL statement:". but it is working on other databases like DB2, Datacom etc...I have googled the issue some of the folks are saying this feature not supported by H2 and Derby. Can any body suggest me the solution or work around for this.
My Query:
Steve McLeod
unread,
Oct 7, 2016, 4:04:51 AM10/7/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to H2 Database
Have you tried concatenating the two columns into one column?
I don't know if that would work, just an idea.
PS: I think you'd have more success finding a solution if you post this on stackoverflow.com
Noel Grandin
unread,
Oct 8, 2016, 10:36:51 AM10/8/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to h2-da...@googlegroups.com
we don't support multiple-column-IN queries, you'll need to rewrite it as a JOIN