|
Posted by t8ntboy on 09/30/35 12:00
On Jan 16, 12:23 pm, "Plamen Ratchev" <Pla...@SQLStudio.com> wrote:
> Yes, it would have to be a LEFT OUTER JOIN, something like this:
>
> ...
> FROM dbo.SAF2_Status AS S
> INNER JOIN dbo.SAFs AS C
> ON S.CESAFID = C.CESAFID
> LEFT OUTER JOIN dbo.Instructors AS I
> ON C.Inst1 = I.Inst1
> ...
>
> HTH,
>
> Plamen Ratchevhttp://www.SQLStudio.com
Once again, works great! Thanks!
Is it possible to exclude courses if there most recent status is not
('DEPTSETUP', 'DEPTQUEUE', 'CERTRN',
'DEPTCORRREQ')?
For instance,
A course record may look like this:
Course Status Date
BIOL 101 DEPTSETUP 5/5/2007
BIOL 101 CERTRN 6/30/2007
BIOL 101 REMOVE 7/8/2007
Since the status REMOVE is the most recent I want the course to be
excluded from the results.
The SQL statement above overlooks REMOVE since it is not part of the
IN clause even though it is the most recent status.
Navigation:
[Reply to this message]
|