Hi there,
I was hoping someone could help me with a problem I have with an SQL query.
There are some instances in the database where there are entries with the same 'item_product_code', but with different prices depending on the item_stone_field (see sample below)
What i need to do is get some SQL to return all UNIQUE item_product_code fields, and if there are more than one, just list the first. (The rest will be dealt with in another query).
item_id item_supplier item_product_code item_ cat_finish item_cost_price item_stone
28 2 1016 Sterling 6.95 green
29 2 1016 Sterling &nb sp;6.95 black
30 2 1016 Sterling 4.95 blue
33 2 1014 Sterling 4.95 blue
This is my latest attempt which unforunately doesn't work!!
Sql = "SELECT DISTINCT(item_product_code), item_cost_price FROM Products WHERE Products.item_cat_prodtype ='" & insBrowse & "' GROUP BY item_product_code, item_cost_price "
Any suggestions?
Cheers
Nick