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
Win a copy of
EJB 3 in Action
this week in the
EJB and other Java EE Technologies
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
Stored Procedure inside HQL query?
Help with HQL Insert and Joins using Hibernate 3 / JPA
HQL query for multiple conditions met
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014