>>Never search like this:
>>
>>
select * from myTable where myDatetime = m.ltDatetime
>>
>>But like this:
>>
>>
select * from myTable where ttoc(myDatetime,1) == ttoc(m.ltDatetime,1)
>>
>>or a similar expression.
>>Cetin
>
>When > < Between() is it also better to use ttoc()? Like ttoc(myDatetime,1) >= ttoc(m.ltDatetime,1)
I'd say so, because your variable is again prone to this roundoff error, and if its value is one of those that don't calculate correctly, it may not match the one record which has the same datetime (but not exactly the same). Though the chances for this error are low, once it happens you may lose a lot of time trying to figure it out.