I am new to DB and I am struggling with this. I have an existing table with the following columns:
Showroom, Salesperson, Time1, Time2, Time3, Dte
I am trying to delete all rows in a table that have zero or zero values in all three temporary columns. I tried the following:
DELETE FROM myTable
WHERE EXISTS(
SELECT *
FROM myTable
WHERE (Time1 IS NULL OR Time1 = 0)
AND (Time2 IS NULL OR Time2 = 0)
AND (Time3 IS NULL OR Time3 = 0)
)
Fortunately, I am working on a test version of the database, since I destroyed all the data. Any help would be really appreciated.
Kathy source
share