Nested & Correlated Queries

  • Hi All

    I have Table

    WorkIdWorkNameActualStartDateActual EndDateActiveGate Status Crrent

    10528AXYR 02-02-200002-05-2000 Null C

    10298MJUY 03-02-199906-07-1999 Null P

    10235PERE 06-05-199905-05-2000 10528 P

    10111WE#$R 05-05-198702-05-1990 10298 C

    I need All the Records From the Table & ActiveGateDate ( Actual_StartDAte based on Work_id = ActiveGate)

    Select a.WorkId,a.WorkName,a.ActualStartDAte,a.ActualEndDate, b.ActiveGateDAte a.Statuscurrent

    From Work a join Work b On a.ActiveGate = b.WorkId

    With this query i'm getting only two Records but i need all four records with activeGateDate(It can be Null Where ActiveGate is null)

  • This was removed by the editor as SPAM

  • Stewart "Arturius" Campbell (5/28/2012)


    Try using a LEFT JOIN instead

    +1 Stewart.

    LEFT JOIN would do it.

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply