Re: How to loop through the dates? [message #186132 is a reply to message #186122] |
Sun, 15 June 2014 21:39 |
Doug Miller
Messages: 171 Registered: August 2011
Karma:
|
Senior Member |
|
|
richard <noreply(at)example(dot)com> wrote in news:cyaf96m0jpev$.1a2m47bjjrqjk$.dlg@
40tude.net:
> In this instance "date" in the line you left quoted, refers to a column
> name.
Yes, we understand this. You don't appear to understand that *calling* a string column
"date" doesn't actually *make* it a date. A string column named "date", and a DATE
column are distinctly different data types.
> What if it had been "hits" instead or "title"?
Then you wouldn't have a problem -- because SQL sorts both numeric data and string data
in the order you expect it to be sorted, but when you store a date as a MMDDYYYY string,
the sorted order is *not* what you expect.
> You guys are hell bent on this date issue you forget that columns can hold
> any data in any manner.Regardless of their name.
We're not forgetting anything. You are failing to realize that strings are not appropriate
storage types for date data.
> The only two things the table cares about is, the data is either a string
> or a numeric.
Patently false. Those are not the only types of data that can be stored in a SQL database.
You, in particular, have no excuse for being unaware of that fact, since you have been told
many times that you should store dates using the DATE data type. This you have
truculently and ignorantly refused to do.
And now you have a perfect example of *why* you were advised to use the DATE date
type to store date information.
|
|
|