Hi
I need some help in writing a query to select the top bit for each car in a query.
The code that i have so far selects the top value but wont return each car.
<cfquery name="qBidSelect1" datasource="#request.dsName#">
select top 1 Bid.Bid,
Bid.CustomerID ,
Bid.TenderID ,
Tender.TenderName ,
Customer.CustomerName,
Car.CarID,
Car.CarNumber ,
Car.MakeAndModel ,
Car.RegNumber ,
Car.Mileage ,
Car.Garage ,
Car.Salesman
from Bid
join Customer on Customer.CustomerID = Bid.CustomerID
Join Car on Car.CarID = Bid.CarID
join Tender on Tender.TenderID = Bid.TenderID
where
1 = 1
Order by Bid DESC
</cfquery>
Would really appreciate someones help
Thanks
J
I need some help in writing a query to select the top bit for each car in a query.
The code that i have so far selects the top value but wont return each car.
<cfquery name="qBidSelect1" datasource="#request.dsName#">
select top 1 Bid.Bid,
Bid.CustomerID ,
Bid.TenderID ,
Tender.TenderName ,
Customer.CustomerName,
Car.CarID,
Car.CarNumber ,
Car.MakeAndModel ,
Car.RegNumber ,
Car.Mileage ,
Car.Garage ,
Car.Salesman
from Bid
join Customer on Customer.CustomerID = Bid.CustomerID
Join Car on Car.CarID = Bid.CarID
join Tender on Tender.TenderID = Bid.TenderID
where
1 = 1
Order by Bid DESC
</cfquery>
Would really appreciate someones help
Thanks
J