I cant find an answer for this one if anyone could please help that would be great :this statement gives me the following resultset (where the highlighted red is the sale date column): select * from itemsales_test where saledate = '15/01/2007'
- saledate
- 26399595 2007-01-15 00:00:00 105 1951 6.32 3 0 .000 N 3 1.00 3.00 1 26399596 2007-01-15 00:00:00 105 56490 2.98 2 0 1.620 N 3 1.00 2.00 1 26399671 2007-01-15 00:00:00 105 100786 9.98 2 0 6.186 N 3 6.00 .33 35858 26399672 2007-01-15 00:00:00 105 100794 .99 1 0 .508 N 3 8.00 .13 66429C 26399673 2007-01-15 00:00:00 105 100798 .39 1 0 .325 N 3 24.00 .04 23723 26399674 2007-01-15 00:00:00 105 100802 7.16 4 0 4.030 N 3 12.00 .33 66429C
-
but this Select * from itemsales _test order by saledate desc
gives me this: SALEDATE -
- 26284233 2007-01-13 00:00:00 103 100052 4.49 1 0 2.005 N 2 6.00 .17 13540 26284234 2007-01-13 00:00:00 103 100067 1.76 2 0 1.060 N 2 12.00 .17 11936 26284235 2007-01-13 00:00:00 103 100080 1.55 1 0 .988 N 2 15.00 .07 20108 26284236 2007-01-13 00:00:00 103 100225 2.18 2 0 1.438 N 2 12.00 .17 13816 26284237 2007-01-13 00:00:00 103 100239 .39 1 0 .249 N 2 36.00 .03 22790 26284238 2007-01-13 00:00:00 103 100260 .31 1 0 .162 N 2 48.00 .02 34160
-
I was expecting the select * from itemsales _test order by saledate desc
statement to give me the 15/01/2007 first in the resultset .why is this ?when select max(saledate) from itemsales_test
also gives me '2007-01-15'