>>Bad solution indeed.
>
>Yes but it worked - how can it be bad?
>
>Thanks
If it worked on a small dataset, it would be a dreadful performance on a bigger dataset. You should stay away from SET FILTER command, but if you insist on using it, then try to use the expression matching your index. Say, create an index on ttod(dateTimeColumn) and use it to compare with the date.
If it's not broken, fix it until it is.
My Blog