Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Hibernate Please convert this SQL query to hibernate

Have Programming Question? Ask it here!
 
 
 


nandha
Please convert this SQL query to hibernate
1 Answer(s)      4 years and 3 months ago
Posted in : Hibernate


I have a SQl query, which needs to be converted to HQL query, but i am not successfull, please help me

select a.msisdn,sum(b.amount) 'amount'
from account a
inner join accrued_Transaction b on a.msisdn = b.msisdn
where a.account_group = 300 and a.opt_in_date is null and b.year <= 2010
AND b.quarter <= 2 AND (b.opted_in is null OR b.opted_in = 1)
GROUP BY b.msisdn, a.msisdn

Please, thanks in advance

Advertisement
View Answers

May 25, 2010 at 4:46 PM


Hi Friend,

Please visit the following links:

http://www.roseindia.net/hibernate/hibernate-aggregate-functions.shtml
http://www.roseindia.net/hibernate/index.shtml

Hope that it will be helpful for you.

Thanks


Related Tutorials/Questions & Answers:
Please convert this SQL query to hibernate - Hibernate
Please convert this SQL query to hibernate  I have a SQl query, which needs to be converted to HQL query, but i am not successfull, please help me..._in is null OR b.opted_in = 1) GROUP BY b.msisdn, a.msisdn Please, thanks
display sql query in hibernate
display sql query in hibernate  If you want to see the Hibernate generated SQL statements on console, what should we do
Advertisements
Named ? SQL query in hibernate
Named ? SQL query in hibernate  What is Named SQL query in hibernate...; </hibernate-mapping> Now you can use it as below: Query query... putting the sql queries to various places in between code. sample.hbm.xml <
Hibernate SQL Query/Native Query
This tutorial describes Hibernate SQL Query, which is also known as Native Query
Hibernate Native SQL Query Introduction
In this section, you will learn Hibernate Native SQL query
Hibernate Named Native SQL Query
In this section, you will learn Named Native SQL Query in Hibernate
find SQL query created by Criteria - Hibernate
find SQL query created by Criteria  Hi there, I am new to hibernate and want to know if I have some code like this... Criteria criteria = p... lignesDel = criteria.list(); where would I find my SQL code which is generated
Hibernate Named Native SQL Query using XML Mapping
In this section, you will learn Named Native SQL Query using XML Mapping in Hibernate with an example
Hibernate Query - Hibernate
Hibernate Query  Hibernate Query
on hibernate query language - Hibernate
on hibernate query language  Display the contents of 2 fields in a table in a single column using SQL statement.Thanks!  Hi friend,read for more information,http://www.roseindia.net/hibernate
Sql Query
Sql Query  Is this query work in Db2 or not ? Select * from FORUM LIMIT 2
Sql Query
Sql Query  Is this query work in Db2 or not ? Select * from FORUM LIMIT 2
sql query
sql query  two tables are emp,loc write a query to display all the emp information whose locname not equal to bangalore
Sql Query
Sql Query  Hi M Navjeet Ghai I want to know How to Show A name(Like Navjeet Ghai And Manpreet Singh Sodhi) of employees from a employee table as N.Ghai & M.S.Sodhi by using sql query
sql query
sql query  hi friend, Im doing a project,in that a main id... numbers of sids.i want to delete the sid based on the mid.for that i need sql query plz help to me
sql query
sql query  hi friend, Im doing a project,in that a main id... numbers of sids.i want to delete the sid based on the mid.for that i need sql query plz help to me
sql query
sql query  hi friend, Im doing a project,in that a main id... numbers of sids.i want to delete the sid based on the mid.for that i need sql query plz help to me
SQL Query
SQL Query  Selecting the third highest salary of Employee without using any subquery?   Here is a query: SELECT salary FROM employee ORDER BY salary DESC LIMIT 2,1
SQL QUERY
SQL QUERY  am a having a table 'PROGRAMMER' with columns... C pascal Bhanu Sql... Pascal Sql Mahesh DBASE Cobol
sql query
sql query  SQL QUERY BROWSER declare @cout00 int declare @cout01 int...+@cout10+@cout11) print 'C1='+convert(decimal(10,0),@c1) select @gss=(@cout11-@c1)/(@cout11+@cout10+@cout01-@c1) print 'GSS='+convert(decimal(10,0),@gss
SQL query
SQL query  I need to combine two tables in order to get the values. As an example we have three tables having namely usertable,job table... inner join in order to get the user_id. Please help me
convert data format sql
convert data format sql  convert data format sql
query - SQL
tell me how to write the query in database but not jsp code. thank u
SQL Query - SQL
SQL Query  Hi I would like to know how to create a SQL query which would copy values from a field which contains multiple values to an existing... | +-----+-----------+-------------+ Query: INSERT INTO table2 (fruit1, fruit2, fruit3
Hibernate Query Language (HQL)
for the names of the Java Classes and properties. Hibernate Query Language is used to execute queries against database. Hibernate automatically generates the sql query...Hibernate Query Language (HQL)  What is Hibernate Query Language (HQL
hibernate query
hibernate query  hibernate apache par kam karta hai kya   Hi Friend, Yes. Thanks
upgrading sql query join
upgrading sql query join  upgrading sql query join
Hibernate Query Language
to execute queries against database. Hibernate automatically generates the sql query... Hibernate Query Language       Hibernate Query Language or HQL for short is extremely powerful
Hibernate Query Language
Hibernate Query Language   Explain Hibernate Query Language(HQL) of Hibernate?   Hi Samar, Hibernate Query Language is a library for mapping relational database to java classes. It is similar in visual aspect to SQL
sql query - SQL
sql query  hi sir,i have a month and year numbers,when i am enter a month and year in sql query then i want results for 1st day of month to last day of month in that year for that month plz provide a solution
Sql query from oracle
Sql query from oracle  Please help me that I want to get the table names form the existing database who does it having eid coloumn plz provide me query in oracle database
optimize sql query
optimize sql query  How to optimize sql query in mysql? Thanks
sql query - JDBC
sql query  I need a SQL query to add data into database
SQL query - SQL
SQL query  hi sir/Madam i am using MS Access where i have table like Fees_Struc: Amount (INT) Due_Date (Date) Fees_Pay: Paid(INT) Student_Bal: Panalty(INT) my problem is when the Due_date is equal
Hibernate Isolation Query. - Hibernate
Hibernate Isolation Query.  Hi, Am Using HibernateORM with JBOSS server and SQLSERVER.I have a transaction of 20 MB, when it is getting processed, all the tables are getting locked, But my requirement is i have a GUI where
select query using hibernate
select query using hibernate  Hi, can any one tell me to select records from table using hibernate. Thanks   Please visit the following link: Hibernate Tutorials The above link will provide you different
Hibernate query - Hibernate Interview Questions
Hibernate query  Hi,In my one interview i face one question that is how to write query without using hql and sql.If any body knows please give the answer thank u
CONVERT VALUE MONEY TO WORDS IN SQL?
CONVERT VALUE MONEY TO WORDS IN SQL?  i want to covert money or varchar value (like 7500000 ) in words like (75 lacs) then how to convert this value in this words . please give me solution
Problem in updating query in Hibernate - Hibernate
, Please visit the following link: http://www.roseindia.net/hibernate...Problem in updating query in Hibernate  Hi, I have used a query to update the existing columns of one table. The query updates the records
SQL QUERY - JDBC
SQL QUERY  I m running a query using apache tomcat the sql query is on adding an employee in the database whenever i click on add after inserting the values i am getting a java.lang.nullpointer exception
Please explain Hibernate Sessionfactory.
Please explain Hibernate Sessionfactory.  Hi there, Please explain Hibernate session factory in detail. I have just started learning hibernate so i... to Hibernate you can go through the following links which we have provided
Hibernate Query Language
database. Hibernate automatically generates the sql query and execute...Hibernate Query Language           Introduction to Hibernate Query Language
Intro please - Hibernate
Intro please  Hi, Anyone please tell me why we go for hibernate? is there any advanced feature? Thanks, Prabhakaran.  Hi friend, Here is the detail information about hibernate. Read for more
hibernate sql error - Hibernate
hibernate sql error  Hibernate: insert into EMPLOYE1 (firstName..., Please visit the following links: http://www.roseindia.net/hibernate/index.shtml http://www.roseindia.net/hibernate/insert-data-database.shtml Hope
delete query problem - Hibernate
delete query problem  SessionFactory fact = new Configuration...'"; Query query = sess.createQuery(hql) query.executeUpate(); // int row=query.executeUpdate(); tx.commit(); i coded the above query but the IDEA 6.0
SQL QUERY ERROR
SQL QUERY ERROR  Im writing a query which shows error of INVALID CHARACTER The Query is Insert into PMST_EMP_MST(PMSNUM_EMP_ID,PMSSTR_EMP... IN THE DATABASE. PLEASE HELP ME.  Syntax of insert query is: INSERT
Criteria Query Examples in Hibernate
Criteria Query Examples in Hibernate  How to use the Criteria Query in Hibernate? How to select the data using Criteria Query of Hibernate? Thanks... Criteria Query in Hibernate with Examples code. Check the tutorial Criteria Query
Hibernate Criteria Query Example
Hibernate Criteria Query Example  Hi, How to create Hibernate Criteria Query Examples in Java program? Share me the easy to learn example code. Thanks   Hi, Hibernate Criteria Query is used to selectively find
SQL Query - JSP-Servlet
SQL Query   AS mysql backend updation query shows a syntax error. I gave the full query and the generated error here. Please send me the correct query anyone. st.executeUpdate("update stud_detail set name='"+newname
Please help me understand this query
Please help me understand this query  Hi, Could someone please help me understand the following query. Im finding difficulty relating it :-( Pls Help! select * from cbpartner where CBPartner.IsSummary='N' and salesrep_id
Advertisements
 

 

 

DMCA.com