i have problem using
select * from TEST where TIME LIKE '2012-03-04-%'
Just expanding on @mortb's answer, I'd either use
WHERE time >= '2012-03-04' AND time < '2012-03-05'
The advantage of using
BETWEEN or a comparison that using
LIKE will mean that if there is an index on
time it wouldn't be able to be used due to the casting.