I have a select statement where I need to select data from 2 columns. From one of these columns, I also need to use the Min function to select the Min number from the data. Heres what my statement looks like:
mySQL1="SELECT h.year, h.MDOfficeVisit AS [data], MIN(h.MDOfficeVisit) AS [MinData] FROM historical h WHERE h.condition_id=" & intcid & " AND h.factdataregion_id=" & intdsource & " Order By h.year ASC"
I am getting an error that this statement cannot be performed. How can I accomplish this?
thanks
mySQL1="SELECT h.year, h.MDOfficeVisit AS [data], MIN(h.MDOfficeVisit) AS [MinData] FROM historical h WHERE h.condition_id=" & intcid & " AND h.factdataregion_id=" & intdsource & " Order By h.year ASC"
I am getting an error that this statement cannot be performed. How can I accomplish this?
thanks