Monday, 15 March 2010

sql - Does OpenJPA support Where In Select queries? -



sql - Does OpenJPA support Where In Select queries? -

so have query follows trying run on db2 using openjpa:

@namedquery(name="getstuff", query = "select mtl.final, mtl.entity " + "from mct mct, mtl mtl " + "where ~~~~~~~~~~~~~~~ " + "and ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " + "and ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " + "and ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " + "and ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " + "and ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" + "and ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " + "and ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " + "and ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " + "and mct.ctotpk.label in ( select mccp.ccppk.cplc " + "from mccp mccp mccp.ccppk.clc = '#my string#')")

i can rid of in select statements (bottom 2 lines) , run. can't figure out what's wrong bottom 2 lines.

whenever run though db2 error: db2 sql error: sqlcode=-199, sqlstate=42601, sqlerrmc=for;and or having grouping intersect order ) fetch except minus union, driver=3.61.75

when looked error found "illegal utilize of keyword" don't know else do. there alternative in select seek out? help.

sql db2 openjpa

No comments:

Post a Comment