Newbie SQL Left Outer Join
shall_at_uaex.edu
Date: 02/19/05
- Previous message: Fred Taylor: "Re: Compound index and unique"
- Next in thread: David Portas: "Re: Newbie SQL Left Outer Join"
- Reply: David Portas: "Re: Newbie SQL Left Outer Join"
- Messages sorted by: [ date ] [ thread ]
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
- Previous message: Fred Taylor: "Re: Compound index and unique"
- Next in thread: David Portas: "Re: Newbie SQL Left Outer Join"
- Reply: David Portas: "Re: Newbie SQL Left Outer Join"
- Messages sorted by: [ date ] [ thread ]