I need some help in the SQL select statements with the condition. The select should contain something like this where:-
One cust_id have many listing_id. Each listing carry status such as O and R. There are thousand’s of cust_id with the status of ‘O’ and ‘R’. If the cust_id have all ‘O’ status and no ‘R’ status, the another table will be updated.. If have ‘O’ and ‘R’ in that cust_id it will be skipped.
What I need to do is to select cust_id that have all listing_id with the status of ‘O’ only and update in the another table.
Do anyone have suggestions. Pls let me know…
Thank You…