Which of the following is an example of an appropriate message to be places in t
ID: 3706395 • Letter: W
Question
Which of the following is an example of an appropriate message to be places in the code for items ( i ), ( ii ), ( iii ), and ( iv )?
1. Amount of credit you have on this specific invoice
2. Amount you owe for this invoice is nothing, credit due, would you like this amount in cash?
3. currently owe on this invoice is
4. invoice is overdue, please pay up
DECLARE balance due var NUMBER 9.2 SELECT invoice_total payment_total - credit total INTO balance due var FROM invoices WHERE invoice_id 16 CASE WHEN balance_due_var> 0.0 THEN DBMS_OUTPUT PUT_LINEIl balance_due_var) WHEN balance_due_var 0.0 THEN DBMS OUTPUT PUT LINE( WHEN balance_due_varExplanation / Answer
Above is a PLSQL code where it is calculating invoice_total-payment_total-credit_total and the obtained result is stored in balance_due_var.
So if balance_due_var is greater than 0.0 that means invoice_total is greater than sum of credit_total and payment_total.So correct choice for (i) is 3
If balance_due_var is 0.0 then suitable is i.e for (ii) is 1
If balance_due_var is less than 0.0 then credit_total is greater than the result of invoice_total-total_payment. So, answer for (iii) is 2
If any of the above case is not satisfied then 4 gets printed. So for (iv) it is 4
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.