aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Multiple column selection using EJB-QL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Multiple column selection using EJB-QL " Watch "Multiple column selection using EJB-QL " New topic
Author

Multiple column selection using EJB-QL

Vivek Mathur
Greenhorn

Joined: Jun 29, 2007
Posts: 25
Hi

I want to select multiple columns through EJB-QL, but whenever i write that
it gives an exception saying it was expecting 'from' instead of ','.
EJB-QL is like as follows:

select m1.code, m1.text from DROP_VALUE m1 where lang=?1

Home method for this is having return type as 'Collection'

Can you please tell can we select multiple columns at a time or not throgh EJB-QL and if yes, then how todo that.
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31075
    
232

Vivek,
This thread implies that it should be possible.

I haven't tried it though and would recommend just returning m1 (the whole entity) if you having problems.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Multiple column selection using EJB-QL