Yeah something like that 'cept I have to get orders that have not been
marked yet and are needing to be sent.

Doing it slightly differently now though as the main query is got
through a web service so I am planning on getting all of the orders in
one query. Saving this query to the session scope probably and doing
queries on that query to deal with one order at a time. Only want to use
the web service once you see as it is on a 56k modem (actually about 30k
as they are in the middle of nowhere) so it will probably be quite slow.

Really like queries of queries BTW, not used them before. I can also
join two queries together which is very useful for what I am doing.


Giles Roadnight
http://giles.roadnight.name


-----Original Message-----
From: Stephen Moretti [mailto:stephen@;cfmaster.co.uk] 
Sent: 04 November 2002 16:52
To: [EMAIL PROTECTED]
Subject: Re: [ cf-dev ] Maxrows and grouping

SELECT * FROM ORders
WHERE OrderNumber IN (SELECT Min(OrderNumber) from Orders WHERE
customerid =
1234)
ORDER BY OrderNumber, ItemID

??  Making it up....

----- Original Message -----
From: "Giles Roadnight" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 04, 2002 4:09 PM
Subject: [ cf-dev ] Maxrows and grouping


> Hi guys.
>
> I have this code:
>
> <cfoutput query="getInvoicesReturn" group="ordernumber">
> <h2>#ordernumber#</h2>
> <cfoutput>
> #booknumber#
> </cfoutput>
> </cfoutput>
>
> That gives me this output:
>
> 5182
> 1 2 3 4 5 17 18 6 7 8 9 10 11 12
> 5183
> 1 2 3 4 5 17 18 6 7 8 9 10 11 12
>
> This is all well and good but I want to output only the first order so
> this code:
>
> <cfoutput query="getInvoicesReturn" group="ordernumber" maxrows="1">
> <h2>#ordernumber#</h2>
> <cfoutput>
> #booknumber#
> </cfoutput>
> </cfoutput>
>
> gives me this output:
>
> 5182
> 1
>
> How can I get it to only give me the first order? I am sure I have got
> this to work before but I can't remember how. I could do it with IF's
of
> course - only outputting the line if the order number is the same as
the
> last one but I would rather do it another way if possible.
>
>
> Giles Roadnight
> http://giles.roadnight.name
>
>
>
> --
> ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> For human help, e-mail: [EMAIL PROTECTED]
>
>



-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]



-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to