File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Object Relational Mapping
Hibernate SELF LEFT OUTER JOIN
Joined: Dec 04, 2007
Mar 19, 2010 00:05:48
I am trying to use self left outer join using SQLQuery, but it dosnt work, any idea on this...
String strQuery = "select j1.job_item_id, j2.job_item_id, j1.job_id, j2.job_id from tt_job_item as j1 " + "left join tt_job_item as j2 on j1.locked_item = j2.locked_item and j1.job_id = 1 " + "and j2.job_id != 1 and j1.job_item_status = 'RUNNING'"; SQLQuery sqlQuery = session.createSQLQuery(strQuery);
However the same query works fine when run through
Any idea whay?
Hope to get response soon,<br />Thanks,<br />Prem.
Joined: Jul 29, 2008
Mar 19, 2010 01:16:25
"Prem Java", please check your
regarding an important administrative matter.
Author of ExamLab
- a free SCJP / OCPJP exam simulator
My Home Page
How to Ask a Question
subject: Hibernate SELF LEFT OUTER JOIN
join() method; guarenteed behaviour
regarding sql query
puzzle - water jar
Inserting single column values of database table into multiple columns of jtable and do comparison
HQL Self Left Outer Join
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013