ORDER BY works in JBossQL.
It is also in the EJB 2.1 spec. But, I believe JBoss 3.2.x currently 
supports 2.0.

Regards,

Harm de Laat
Informatiefabriek
The Netherlands




"Stephane Nicoll" <[EMAIL PROTECTED]> 
Sent by: [EMAIL PROTECTED]
11/06/2003 09:53 AM
Please respond to
[EMAIL PROTECTED]


To
<[EMAIL PROTECTED]>
cc

Subject
RE: [JBoss-user] Challenge for EJB-QL, JBossQL, or declared SQL?






I am not sure ORDER BY is allowed (what about caching then?)
I know EJB QL does not allow that. Maybe JBoss QL.

Regards,

Stephane

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 06, 2003 9:24 AM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] Challenge for EJB-QL, JBossQL, or declared
SQL?


Doesn't 'ORDER BY' help you?




"Darren Hartford" <[EMAIL PROTECTED]> 
Sent by: [EMAIL PROTECTED]
11/05/2003 04:10 PM
Please respond to
[EMAIL PROTECTED]


To
<[EMAIL PROTECTED]>
cc

Subject
[JBoss-user] Challenge for EJB-QL, JBossQL, or declared SQL?






Hey all,
I got an interesting problem that I should think some of you may have 
already come across in some fashion or another.  I want to do a search to 
return a collection of objects, but it needs to be very specific as 
follows:

Example table:
batchnumber | sequence | receive_date | town | item | status
with example values:
"1",1,"11/5/2003","MONTREAL","widget", "INVENTORY"
"1",2,"11/5/2003","MONTREAL","widget", "FRONT"
"1",3,"11/5/2003","MONTREAL","widget", "INVENTORY"
"2",1,"11/5/2003","MONTREAL","foo", "FRONT"
"3",1,"11/5/2003","MONTREAL","bar", "FRONT"
"3",2,"11/5/2003","MONTREAL","bar", "SOLD"
"4",1,"11/5/2003","TORONTO","bar", "FRONT"
"5",1,"11/6/2003","MONTREAL","bar", "INVENTORY"

What I would like is the **last sequence-per-batchnumber** for results 
based on a search.
example psuedo-query:
SELECT OBJECT(o) WHERE ((o.town = "MONTREAL") AND (o.receive_date = 
"11/5/2003"))
would return:
"1",3,"11/5/2003","MONTREAL","widget", "INVENTORY"
"2",1,"11/5/2003","MONTREAL","foo", "FRONT"
"3",2,"11/5/2003","MONTREAL","bar", "SOLD"

And another psuedo-query:
SELECT OBJECT(o) WHERE (o.item = "bar") 
would return:
"3",2,"11/5/2003","MONTREAL","bar", "SOLD"
"4",1,"11/5/2003","TORONTO","bar", "FRONT"
"5",1,"11/6/2003","MONTREAL","bar", "INVENTORY"

Based on JBoss 3.2.2 and Mysql 3.23, could EJB-QL, JBossQL, or some type 
of declared SQL be able to solve this? An example pretty please!

Thanks everyone!
-D


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to