SQL Query, complete brain freeze ?!?!

Viewing 1 post (of 1 total)
  • Author

  • QuattroDave

    I’ve been staring at this all morning now and I’m no further on with it.
    Essentially what I want is to display the user with a list of available teachers but show the teachers in the respected availability type (colour) to help make the decision ‘who do I contact first’ a bit easier…

    I have 3 tables with data in :

    T_ID (pri key)

    B_ID (pri key)
    B_TID (Once teacher assigned T_ID stored in here to link booking to teacher)

    A_ID (pri key)
    A_TID (teachers T_ID stored here to link teacher to availability)
    A_Colour (different colours indicate different availability types)

    Ok, what I’m trying to achieve is:-
    return T_Name, T_ID & A_Colour
    when T_Status=’Live’ and
    when B_Startdate & B_Enddate = A_Availdate’s

    The problems are that
    1. If the availability isn’t set I still need to return T_Name it just won’t have any colour associated.
    2. In the booking you have a startdate and an enddate but in the availability you have every day listed but only if it has a colour associated with it…

    Hope that all makes sense… I’m really confused about how to deal with this and am beginning to wonder if I am storing the data correctly to be able to query like this……:?

    Any thoughts greatly appreciated….


Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

External Sharing and Guest User Access in Microsoft 365 and Teams

This eBook will dive into policy considerations you need to make when creating and managing guest user access to your Teams network, as well as the different layers of guest access and the common challenges that accompany a more complicated Microsoft 365 infrastructure.

You will learn:

  • Who should be allowed to be invited as a guest?
  • What type of guests should be able to access files in SharePoint and OneDrive?
  • How should guests be offboarded?
  • How should you determine who has access to sensitive information in your environment?

Sponsored by: