English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I am not actually deleting the records, I just want to mark them as inactive. How can I do this?

I want to mark a record for deletion if their bill is over 14 days overdue. So how can I write this?

I know how to display them on the screen:

SELECT CUSTOMERID "Customer ID",
LASTNAME ||', '||FIRSTNAME "Customer Name",
DAYSOVERDUE "Days Overdue"
FROM CUSTOMER NATURAL JOIN BILLING_INFO
WHERE (BILLING_INFO.DAYSOVERDUE > 14);

Now what can I add to this statement to make it mark those records for deletion? Or do I have to write another statement completely? Please help!

2006-12-17 15:37:20 · 1 answers · asked by Anonymous in Computers & Internet Programming & Design

1 answers

UPDATE customer SET mark_for_delete=1 WHERE ((customer NATURAL JOIN billing_info).daysoverdue>14);

2006-12-17 17:12:10 · answer #1 · answered by DadOnline 6 · 0 0

fedest.com, questions and answers