Select Statements with Condition - TechRepublic
General discussion
October 22, 2005 at 03:02 AM
erakana

Select Statements with Condition

by erakana . Updated 20 years, 8 months ago

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…

This discussion is locked

All Comments