I am having trouble with my search and as I am just starting sql I would like to use a subquery rather than something more advanced.
In my table I want to find row 6 only. That means test_case = 169, pass_fail = fail and fail reason contains 'init' and pressure_low but not pressure_high. So row 4 must be excluded. I figured I would need a subquery to do 2 passes; the first to find 'init' and 'pressure' and a 2nd to exclude 'pressure_high'.
I think I have the conditions right. Table name can be tab1.
Thanks,
JH
Conditions:
test_case = 169
pass_fail = 'fail'
fail_reason like '%init%'
fail_reason like '%pressure_low%'
fail_reason not like '%pressure_high%'
Table tab1