Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB Query Problem  RSS feed

 
Mahesh Malviya
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
There are three fields in a table which makes the primary key. I want to select two of the distinct field from database. say loanid,seq,date are the fields which make the primary key. Now I want to select distinct loanid and seq from the table. how can I make it. because EQL does not allow us to select two fields.
Hope you got my question.

Thanks and Regards
Mahesh Malviya
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my opinion::

you should be created some column for keep data in mutiple key in runtime process.

Example

id1(pk) id2(pk) idAll(multiple pk)
1 1 11
2 2 22

when you create EJBQL :: Select distinct idAll ....
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!