Help with !> and !< conditional syntax
My objective with this query is to get all the incident (osirReport tble) records that have not had a general comment (comments tble) or an action comment (action tble) in the last three months.
osirReport is the main table that shares a one to many relationship with both the comments and action tables (each incident may have multiple action and general comments)
Please note: The query does not error, it just returns no results. I am not sure if I haver used the:
!> (Not Greater Than)
and the:
!< (Not Less Than)
operators properly
SELECT distinct osirReport.osirId,osirReport.osirShipNum,osirRepor t.osirHRI,osirReport.osirOrId,osirReport.osirSigna lDateTime,osirReport.osirActId,osirReport.creation Date FROM ((osirReport
LEFT OUTER JOIN reportComments ON osirReport.osirID = reportComments.osirID)
LEFT OUTER JOIN action ON osirReport.osirID = action.acOsirID)
Where (osirReport.osirStatus=1) AND (osirReport.osirTypeId IN ( 2))
AND (
((reportComments.lastEdited !> '2/22/2006 12:00:00 AM') AND (reportComments.lastEdited !< '5/22/2006 12:00:00 AM'))
or ((action.acDate !> '2/22/2006 12:00:00 AM') AND (action.acDate !< '5/22/2006 12:00:00 AM'))
)
ORDER BY osirReport.osirSignalDateTime desc;
TYIA
Wind is your friend
Matt
__________________
Wind is your friend
Matt
|