Skip to main content
Karen_Little
Inspiring
August 11, 2006
Answered

Multiple dates for event posting

  • August 11, 2006
  • 2 replies
  • 631 views
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 has been closed for replies.
Correct answer Karen_Little
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!

2 replies

August 11, 2006
> 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?
Karen_Little
Karen_LittleAuthorCorrect answer
Inspiring
August 11, 2006
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!
Inspiring
August 11, 2006
Normalize your database and then you'll be able to write efficient queries.
Karen_Little
Inspiring
August 11, 2006
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.