Newbie SQL Left Outer Join

shall_at_uaex.edu
Date: 02/19/05

  • Next message: David Portas: "Re: Newbie SQL Left Outer Join"
    Date: 19 Feb 2005 13:21:25 -0800
    
    

    I want to select all records out of MyReference and
    only those records from MyList that match

    SELECT R.Name, M.Item
    FROM MyReference R LEFT OUTER JOIN MyList M
    ON R.idkey=M.idkey
    WHERE( (R.Fiscalyear=2005)
    OR (M.Fiscalyear=2005 And M.Item=5))

    The problem is that it includes the records
    when M.Item=0.
    I'm using VFP 6.0. I want my new table to look like this:

    Davis 5
    Jones NULL
    Smith 5

    TIA.
    Steve


  • Next message: David Portas: "Re: Newbie SQL Left Outer Join"