File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes How to get data from 2 column of table through select Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "How to get data from 2 column of table through select" Watch "How to get data from 2 column of table through select" New topic
Author

How to get data from 2 column of table through select

omkar prem
Greenhorn

Joined: Dec 17, 2006
Posts: 8
Hi All,

I have to get data from two column of table. My table name is Employee_Det the fields in the table are ID,Name,Age,Deg. the query i am using to fetch ID and Name are as followes

Query qr = session.createSQLquery("select e.id,e.name from Employee_det as e").addEntity("e",empl.class)

but this query gives an error. I have to do this by using addEntity() method



Prem
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get data from 2 column of table through select