Skip to main content
Karen_Little
Inspiring
Aug 11, 2006 12:52 AM UTC
Answered

Multiple dates for event posting

I'm creating an application where a person can post an event with listings for up to 20 days from filling in the form. I'm saving these dates (one to twenty individual units, using a 20060810-type code, separated by a delimiter) in a single field.

I am trying to figure out how I can construct an efficient query to find a range within a set of date codes that answers the question "what is happening between 8/1 and 8/6" for example. I know how to find things by the day, of course.

Is this possible?

This topic is closed to new replies. Start a new post to keep the conversation going.
Karen_Little
Karen_LittleCorrect answer
Inspiring
Aug 11, 2006 2:50 PM UTC
Over night, I've decided to handle the issue in another way (separate table), so my needs are resolved. That said, after overnight pondering on the subject, I do not think that the task could have been done through a single SQL statement. Thanks for offering to help!

4 replies

Aug 11, 2006 2:19 PM UTC
> I'm saving these dates (one to twenty individual units, using a 20060810-type code,
> separated by a delimiter) in a single field.

Could you post the data from a field that has multiple dates in it?
Translate
Karen_Little
Karen_LittleAuthorCorrect answer
Inspiring
Aug 11, 2006 2:50 PM UTC
Over night, I've decided to handle the issue in another way (separate table), so my needs are resolved. That said, after overnight pondering on the subject, I do not think that the task could have been done through a single SQL statement. Thanks for offering to help!
Translate
Inspiring
Aug 11, 2006 12:58 AM UTC
Normalize your database and then you'll be able to write efficient queries.
Translate
Karen_Little
Inspiring
Aug 11, 2006 1:20 AM UTC
My database is normalized and I can easily find all the events on a specific date using the above method.

What I'd like to do is query the date list for a date that is greater than or equal to the requested date.
Translate