I currently use the following to pull data for today from my database:
select TheTime, Thename, theplace from Stats where Selection = "SIR" and Thedata > 19.99 and DATE(TheTime) = CURDATE()
The field TheTime is a DateTime field. I would like to check if any duplicate times are in this field. If there are then remove them all from the select query.
I am only looking for results that have 1 distinct DateTime. I have tried to use select DISTINCT TheTime but it still pulled the non-distanct values.
Selection = "SIR"Make a habit out of it writing strings values in SQL with single quotes.. in the ANSI/ISO SQL standard double quotes means identifiers meaning columns and or table names..