• The style you used to write your query I call "noodles" as it takes to much time to read top understand what you're are doing.

    Bit messy, really.

    I think the following change should make it work:

    SELECT *, dbo.tPeriod.PeriodDiscription, dbo.[tTimeTable2012-13].StaffID, dbo.[tTimeTable2012-13].DayID

    FROM dbo.tSubject

    INNER JOIN dbo.[tTimeTable2012-13] ON dbo.tSubject.SubjectID = dbo.[tTimeTable2012-13].SubjectID

    AND (dbo.[tTimeTable2012-13].StaffID = 18) AND (dbo.[tTimeTable2012-13].DayID = 1)

    RIGHT OUTER JOIN dbo.tPeriod ON dbo.[tTimeTable2012-13].PeriodID = dbo.tPeriod.PeriodID

    However, I would rewrite it to something like:

    SELECT *

    FROM dbo.tPeriod AS P

    LEFT JOIN dbo.[tTimeTable2012-13] AS T

    ON T.PeriodID = P.PeriodID

    AND T.StaffID = 18

    AND T.DayID = 1

    LEFT JOIN dbo.tSubject AS S

    ON S.SubjectID = S.SubjectID

    Is it easier to see what query is doing now, or am I just too picky?

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]