[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.3

Strange custom scheduler data structure; creative / efficient solution desired

Asked by peh803 in MS SQL Server, Active Server Pages (ASP)

Tags: T-SQL and / or classic ASP, n/a

We have a (poorly written) application scheduling feature in our application that is presenting some interesting issues.  A resource's availability is persisted in our database as follows:

Date                |   Availability
11/30/2008     |   XXXXXXXXXXXXXXXXXXXXAAAAAAAAAXXXXXAAAAAAAAAAAAAXXXXXXXAAAAAAAAAAAAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
12/01/2008     |   XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXAAAAAAAAAAAAAAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXAAAAAAAAAAA
12/04/2008     |   XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXAAAAAAAAAAAAAAAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
.... etc.

There's an ID field so we know which resource the "Availability" string applies to.  Here's the basic thought process behind how this thing works:

-- Each resource has an availability string on dates when he / she is available.  If no record is found for a resource on a given date, the resource is not available at all that day
-- The "Availability" string is 96 characters, each representing a 15-minute increment of the day.  Accordingly, the first character shows the resource's availability between 00:00 and 00:15, and the last character shows the resource's availability between 23:45 and 00:00 of the following day.  

I'm looking for a way to quickly / efficiently be able to select resources that are available for a given date or date range at a given time or time range.  For example, "Show me all resources available between 6:00 AM and 8:00 AM for the week of 12/13 through 12/20."

Obviously, this very strange way of persisting availability makes this quite a challenge.  

I'm looking for efficient, creative ways to solve that problem -- high level ideas or concepts are welcome... Not necessarily looking for someone to do all the work for me -- just to recommend some ideas that I may not have thought of.  

The application is classic ASP, so I could do this using ASP after the availability strings are found for the requested date range(s), but I'm thinking that perhaps there's a better way to do this using T-SQL ?

Thank you in advance for any assistance.

Regards,
Phil / peh803
[+][-]12/06/08 01:15 PM, ID: 23113659Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: MS SQL Server, Active Server Pages (ASP)
Tags: T-SQL and / or classic ASP, n/a
Sign Up Now!
Solution Provided By: adamsjs
Participating Experts: 1
Solution Grade: A
 
[+][-]12/06/08 05:29 PM, ID: 23114373Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/13/08 05:49 AM, ID: 23163905Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92 - Hierarchy / EE_QW_2_20070628