Database Reference
In-Depth Information
Now let's get down to the problem. We will select the data from the
table and sort the select by each of these columns. When we sort by the
RealDate column, we get 31 records, all in perfect date order from January
1 to January 31—no big surprise. Now let's see what happens when we sort
by the StringDate column; the results of the select are shown in Table 8.1.
Table 8.1
The Results of Sorting by a Date Stored in a String Column
StringData RealDate
1/1/2007
2007-01-01 00:00:00.000
1/10/2007
2007-01-10 00:00:00.000
1/11/2007
2007-01-11 00:00:00.000
1/12/2007
2007-01-12 00:00:00.000
1/13/2007
2007-01-13 00:00:00.000
1/14/2007
2007-01-14 00:00:00.000
1/15/2007
2007-01-15 00:00:00.000
1/16/2007
2007-01-16 00:00:00.000
1/17/2007
2007-01-17 00:00:00.000
1/18/2007
2007-01-18 00:00:00.000
1/19/2007
2007-01-19 00:00:00.000
1/2/2007
2007-01-02 00:00:00.000
1/20/2007
2007-01-20 00:00:00.000
1/21/2007
2007-01-21 00:00:00.000
1/22/2007
2007-01-22 00:00:00.000
1/23/2007
2007-01-23 00:00:00.000
1/24/2007
2007-01-24 00:00:00.000
1/25/2007
2007-01-25 00:00:00.000
1/26/2007
2007-01-26 00:00:00.000
1/27/2007
2007-01-27 00:00:00.000
1/28/2007
2007-01-28 00:00:00.000
1/29/2007
2007-01-29 00:00:00.000
1/3/2007
2007-01-03 00:00:00.000
1/30/2007
2007-01-30 00:00:00.000
1/31/2007
2007-01-31 00:00:00.000
1/4/2007
2007-01-04 00:00:00.000
1/5/2007
2007-01-05 00:00:00.000
1/6/2007
2007-01-06 00:00:00.000
1/7/2007
2007-01-07 00:00:00.000
1/8/2007
2007-01-08 00:00:00.000
1/9/2007
2007-01-09 00:00:00.000
Search WWH ::




Custom Search