Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL PROXY BID QUERY

Status
Not open for further replies.

gsc123

Programmer
Jan 24, 2008
197
0
0
Hi, I've place this question here because its relavant to this forum.

I need the following query

I use this query to get most of the information, the price is updated in two tables, one bidhistory and the other the products, so I need somewhere in this select query to pull out min bid for users below the proxy bid from the bidhistory

ie
(select min(bidAmount) from bidhistory INNER JOIN products ON products.idproduct = bidhistory.idproduct) as price

but my select to get everything about the item is:

SELECT products.Description, products.Price, products.ImageUrl, products.idproduct, products.endDate, suppliers.idsupplier, suppliers.supplierName FROM suppliers INNER JOIN products ON suppliers.idsupplier = products.idsupplier WHERE idcategory=21 and ListHidden =
false


EG:

is my structure wrong, because bidhistory is only a history of bids not the products price initially laid out, its the start price say £200 ... if theres no bids then the history does'nt have a record so I need the products.price if there is no bids or to show min price from bidhistory...

I then would need that users highest bid from bidhistory so they can see what higher proxy bid they have entered

I hope this is clear.. many thxs in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top