1 Reply Latest reply on Mar 12, 2007 4:30 AM by Thomas Rois

    how to do a subquery in JBoss?

    qi xiang Newbie

      Hi, all
      now, I need to do a subquery like this:
      SELECT OBJECT(a) FROM SelectedRecs a WHERE a.sID2 IN (SELECT b.SID2 FROM SessionView b WHERE (b.LocalIP='' AND b.RmtIP='') OR (b.LocalIP='' AND b.RmtIP=''))
      note that: SessionView is another table. now I just write an entitybean for table SelectedRecs, not for it.
      when I run the demo using the EJB-QL above, it met some problems.
      so I wanna know how to do a subquery in JBoss, and the subquery is from another table. please give me a suggestion, thanks a lot.
      my msn is: qixiangnj AT gmail DOT com.

      Best Regards,