>so you're saying "give me any job where eventCode is 100 and jobID is N,
>but where the same job doesn't have an eventCode of 150 somewhere else"
That was exactly what I was trying to acheive. You sql worked straight away.
Thank you again for your reply.
Best regards
coder
You can use a sub-query for this, so that you limit your records by a
factor unrelated to the actual record you're looking at...
SELECT EventCode
FROM job a INNER JOIN Event b ON b.job_id = a.job_id
WHERE (b.EventCode = 100) AND (a.job_id = '1234567890')
AND a.job_id NOT IN
(select DISTINCT z.j
Hello everybody, I have a question with regards to a sql select statement and
was hoping someone could help. I'm trying to query a table
and trying to return row where a condition is true.
To give you a better idea; picture a event table. A job can have muliple events
ex, an event to indicate th
3 matches
Mail list logo