Hi. I have a tricky problem which I'm struggling to work out.
I'm using DW
8.0.2 and VBScript and Access.
I have two tables in my Access database:
tableAuction (auctionID, auctiontitle, startingprice)
tableBids (bidID, auctionID, bidderID, bidamount)
I have a recordset on one of my ASP pages which displays a
list of available
auctions. This is held in a repeat region should there be
more than one
auction running at any one time.
However, I would like to be able to display the highest bid
amount for each
auction on this page, but it appears, because I'm trying to
insert this data
within an existing recordsets repeat region, that it isn't
possible? I've
tried the following SELECT statement, but the problem with it
is that it
lists the full auction details for every bid there has been.
I don't appear
to be able to "GROUP BY" to prevent this from happening.
Here's what I
tried:
SELECT qryAuction.auctionID, auctiontitle, qryBids.auctionID,
qryBids.bidamount
FROM qryAuction, qryBids
WHERE qryAuction.auctionID = qryBids.auctionID
Is it possible to group, by auctionID, the list of auctions
produced by the
above statement so that only one occurance of any auction
appears in the
recordset? I also need to ensure that this one occurence
brings, with it,
the highest bid amount from the bids table?
Or am I going about this ALL wrong? <hides>
Would really appreciate some guidance, thanks.
Nath.