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
Select query with multiple where clause
Joined: Sep 02, 2005
Nov 20, 2012 07:03:54
I have two tables with device and transaction
Device Id of device is the foreign key of transaction
how write hql query Device Id not used in second table
My current hql query for device is
String fromClause = "select device from Device device where "+searchCritiria1+" like"+"'%"+searchString1+"%' and "+searchCritiria2+" like"+"'%"+searchString2'"; Query query = getSession().createQuery(fromClause);
here searchCritiria1,searchCritiria2 column name and searchString1,searchString2 are parameters passed from UI
how i added these sql query to
where Device ID not in (select deviceID from transaction)
I agree. Here's the link:
subject: Select query with multiple where clause
Deleting Record in a Web Application.
HQL help needed
Help with HQL Insert and Joins using Hibernate 3 / JPA
Stored Procedure inside HQL query?
HQL query for multiple conditions met
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015