Sorry, i wasn't completely clear.

Well, thats actually what i am going to do. A date column won't take anything 
but a valid date (sort of - feb. 30 is "valid"). 
But i still need to know whether the day of month is meaningful or not, for 
various search / display purposes. My users will raise a major stink if i 
tell them that the date is the first, but it actually isn't, so the display 
functionality for the system will check the date validity flag, and if 
invalid, only display the month and year.

The flag field is there for exactly this purpose.

thanks
sean peters
[EMAIL PROTECTED]


On Monday 27 October 2003 16:44, John Jolet wrote:
> what about forcing the date to the first of whatever month the sale was in?
>  if it's got a valid date, put that, otherwise, put the first.
>
> -----Original Message-----
> From: sean peters [mailto:[EMAIL PROTECTED]
> Sent: Monday, October 27, 2003 4:33 PM
> To: [EMAIL PROTECTED]
> Subject: Unusual date storage requirement
>
>
> Hi all,
> I have run into a date storage problem that i don't like. A am storing
> historic house sales, and some of the old data i have received only
> contains the month and year, but not the date of the sale. Of course we
> want to store this information, but a DATE column won't quite do the job,
> because year, month, and day are all required.
>
> So, my homecooked solution is to use a DATE column, and another column as a
> flag to denote whether the day-of-month is valid. Then i'll need to
> properly craft my searches to understand this.
>
> I know that this is a horrible break of normalization, etc. but i haven't
> come up with a better solution.
>
> Also note that this is for a data warehouse, and myself and 1 other
> programmer are the only people who manipulate the data.
>
> thanks in advance
> sean peters
> [EMAIL PROTECTED]
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to