Chapter02-11 - Copy.sql - DECLARE -Declare variables...

This preview shows page 1 out of 1 page.

The preview shows page 1 - 1 out of 1 page.
DECLARE--Declare variablesnumpayments NUMBER(2);paymentNum NUMBER(2);sdate DATE;dateDue DATE;monthlyPaymentAmt NUMBER(10,2);donationBalance NUMBER(10,2);pamt NUMBER(10,2);paidToDate NUMBER(8,2);BEGIN--Prompt user for IDPledgeSELECT PLEDGEAMT, PLEDGEDATE, PAYMONTHS INTO pamt, sdate, numpaymentsFROM DD_PLEDGEWHERE IDPLEDGE = &IDPLEDGE;monthlyPaymentAmt := pamt / numpayments;dateDue := sdate;donationBalance := (pamt - monthlyPaymentAmt);
End of preview. Want to read the entire page?

Upload your study docs or become a

Course Hero member to access this document

Term
Fall
Professor
N/A
Tags
SQL, Chapter 2, BOOKWOrk, idpledge, 9999 99, monthlyPaymentAmt

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture