Hi,
well I can tell you why does not work, however I can't tell you how to work
it:
The part of query will be put behind the where clause, the returned value
are ALWAYS of type-pk,
so the query generated will look like
Select <your pk representation> From <yourtable> WHERE MAX(col1) WHERE col2
= {0}
and this will certainly not work.
HEY, there is an idea: try this:
<query>col1 = MAX(col1) AND col2 = {0}</query>
hmmm, might work if your DB supports aggregation in where clauses...
Burkhard
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 12, 2001 7:18 AM
Subject: [JBoss-user] Jaws question
> sorry miss send previuos message
>
> Hi all
>
> what write this select to JAWS?
>
> select max(col1) ... where col2="xxx"
>
> I try:
> <finder>
> <name>findByMaxCol</name>
> <query>MAX(col1) WHERE col2 = {0}</query>
> <order></order>
> </finder>
>
> but don't working, can any help me?
>
> Miro
>
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user