-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Unknown type '246 in column 1 of 2
PostPosted: Tue Jan 24, 2006 2:39 pm 
Beginner
Beginner

Joined: Tue Jul 12, 2005 1:50 pm
Posts: 26
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 3
MySQL version : 5.0.18-nt
This is my code in one of my hibernate daos:

Session session = getSession();
String query = "SELECT EXTRACT(YEAR_MONTH FROM s.StoreDate), sum(s.Bookings) from Summaryemp s where s.Employee.Id=? group by 1 ";
list = session.createQuery(query).setInteger(0, empid).list();


It gives me Error:
10:48:24,137 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: S1000
10:48:24,137 ERROR [JDBCExceptionReporter] Unknown type '246 in column 1 of 2 in
binary-encoded result set.

I dont know what is with my sum(s.bookings)? It is Integer!!!!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.