The company I work for shares an office with other companies. We decided to have a common customer database.
The columns of this database are: name (name of the customer), owner (company that contacted the customer), status (status of the relationship with the customer (customer, lead, ex-customer)).
I would like whenever Owner contains my company name and Status contains “customer” to feed another table, called “Customers” (not shared with other companies in the office) with the subject customer row.
And, when from the main shared table, the status changes from “customer” to “ex-customer”, I would like the related row to move from the “customers” table to the “ex-customer” one (always remaining in the main shared table anyway) .