[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!

5.6

Need help with a query :-( :: to check and see if items are already reserved

Asked by stu215 in Databases Miscellaneous, SQL Query Syntax, MS SQL Server

Im making a AV equipment reservation form and I need to check to make sure the equipment isnt already reserved.  There should also be a 5 minute window between all meetings in which the equipment can be reserved.

So if you have a room reserved from 9am -10am the query would need to add 5 mins on both
ends 8:55->10:05 and check to see if there are any meetings in that time span that already have AV items reserved.

There are 3 tables ::
    RoomReservation ( holds room info )
    - R_ID = reservation id
    - mtgDate = meeting date
    - mtgTime = start time
    - mtgEnd = end time
    - active = if N all reservations are cancelled
    - room = if N room is cancelled

    AV_Equip ( has a list of all the equipment one could possibly reserve )
    - EQ_ID
    - EQ_Name

    EQ_Req ( has a list of items reserved )
    - R_ID
    - EQ_ID

Here is what i have so far and it doesnt work :-(  ::

SELECT EQ_Name, EQ_ID
FROM AV_Equip
WHERE EQ_ID NOT IN (
      SELECT EQ_ID
      FROM EQ_Req
      WHERE R_ID IN (
            SELECT DISTINCT R_ID
            FROM sfraser.RoomReservations
            WHERE  Active='Y'
                  AND Room = 'Y'
                  AND mtgDate = '#getInfo.mtgDate#'
                  AND ((mtgTime > #getInfo.mtgTime - .0034722#
                  AND mtgTime < #getInfo.mtgEnd + .0034722#)
                  <!--- Starting time does not fall between 5 minutes
                  before the meeting start  nad 5 minutes after the
                  meeting ends --->
                  OR (mtgEnd < #getInfo.mtgTime + .0034722#))))
                  <!--- or the meeting end is later than 5 minutes
                  after the first meeting ends --->
[+][-]09/28/07 07:50 AM, ID: 19979061Accepted 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: Databases Miscellaneous, SQL Query Syntax, MS SQL Server
Sign Up Now!
Solution Provided By: CCongdon
Participating Experts: 3
Solution Grade: B
 
[+][-]09/26/07 01:17 PM, ID: 19966400Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

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

 
[+][-]09/26/07 01:41 PM, ID: 19966573Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

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

 
[+][-]09/26/07 02:03 PM, ID: 19966746Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

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

 
[+][-]09/26/07 02:11 PM, ID: 19966796Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

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

 
[+][-]09/26/07 02:32 PM, ID: 19966924Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

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

 
[+][-]09/26/07 02:33 PM, ID: 19966925Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

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

 
[+][-]09/26/07 02:40 PM, ID: 19966975Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

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

 
[+][-]09/26/07 02:46 PM, ID: 19967009Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

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

 
[+][-]09/26/07 02:49 PM, ID: 19967022Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

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

 
[+][-]09/26/07 02:51 PM, ID: 19967035Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

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

 
[+][-]09/27/07 07:03 AM, ID: 19971254Author 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.

 
[+][-]09/27/07 07:11 AM, ID: 19971298Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

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

 
[+][-]09/27/07 01:47 PM, ID: 19974629Author 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.

 
[+][-]09/27/07 02:32 PM, ID: 19974945Author 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.

 
[+][-]03/27/08 01:36 PM, ID: 21225498Author 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.

 
[+][-]03/27/08 01:38 PM, ID: 21225511Author 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 / EE_QW_1_20070628