Hi,
I haven't been using db2 much and I need help in writing a query.
My requirement.
---------------
I have a table AAA in which records are inserted like given below. For each Component_name, this table gets 0000 status record only after 9030 status record .
Component_name AAAAAAAA has records with status code 2030, 9030 and 0000. Component_name CCCCCCCC has records with status code 2030 and 9030.
I need to find all components in this table that has received 9030 status but not 0000 status. So, the output that I am looking for from the resulting query is component name CCCCCCCC because this component has only 9030 status and not 0000 status.
Table AAA
----------
Component_name status_code
AAAAAAAA 2030
AAAAAAAA 9030
AAAAAAAA 0000
CCCCCCCC 2030
CCCCCCCC 9030
Let me know if you need more information.
Thanks.