I am creating a new database for our company.
My situation is that every day, we get a list of items that are failing. Sometimes we need to watch these items for a few days.
What I want to do is:
(This is based off of the account number and status)
What I want to do is look at the account number and status. If the account number is found, look at the status. IF the status is not closed, then add the info with the CURRENT incident number into the issues table. If the Account is closed, then create a NEW incident, then add the info into the issues table.
If the account is not found, then create a new incident. and add to the issues table
I will submit my database later as I am making a few little changes.
I am looking for any ideas on the concept here? Can you do an IF OR in a SQL?