MSSQL: Select Statement w/MIN Problem
I have more than one vendor for each county. I need to select the lowest cost vendor and display that record. This select statement works, but it's not selecting the lowest cost vendor. The problem seems to be in the MIN part of the select statement I think Can anyone help me correct this issue?
pricecolumn=rstemp8("PRICE_COLUMN") 'this tells me which pricing column to use in the table.
SELECT MIN("&pricecolumn&") AS PRICE,COUNTY_NOTE_VIEWABLE_BY_CUSTOMER FROM tbl_COUNTY_CRIMINAL_VENDOR_ASSIGNMENT WHERE COUNTY_ID="&countyname&" GROUP BY COUNTY_NOTE_VIEWABLE_BY_CUSTOMER