How to return name of free lab from query?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Charles Ndethi
    New Member
    • Jan 2011
    • 10

    How to return name of free lab from query?

    Here is sample pseudocode to capture the logic.
    Attached is the sql export.

    if ( lab_sessiontime .Start_time > NOW())
    then lab is free for Start_time - NOW() minutes
    _______________ _______________ _______________ _______________ ____

    else if (lab_sessiontim e.Start_time < NOW() )
    then check if ( NOW() > lab_sessiotime. End_time
    if true then lab has been free for [NOW() - End_time] minutes
    else if NOW() < End_time
    lab is occupied for the next [End_time - NOW()]minutes
    Attached Files
Working...