Darren,
Thanks for reply.If u enable warning, it gives error
otheriwse it is sorting by date. later on I will use
different approach but in mean time i want solution.
Do you know how can i solve my above mentioned problem?
"..it gives error otheriwse it is sorting by date"
No. As I already pointed out, it is not sorting by date at all. It only appears to be be working because your sample data happens to be ordered by date. Try re-arranging the lines in your sample data and you will see what I mean.