Chapter02-11 - Copy.sql - DECLARE-Declare variables numpayments NUMBER(2 paymentNum NUMBER(2 sdate DATE dateDue DATE monthlyPaymentAmt NUMBER(10,2

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

This preview shows page 1 out of 1 page.

DECLARE --Declare variables numpayments 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 IDPledge SELECT PLEDGEAMT, PLEDGEDATE, PAYMONTHS INTO pamt, sdate, numpayments FROM DD_PLEDGE WHERE IDPLEDGE = &IDPLEDGE; monthlyPaymentAmt := pamt / numpayments; dateDue := sdate; donationBalance := (pamt - monthlyPaymentAmt); paymentNum := 0; paidToDate := monthlyPaymentAmt; WHILE donationBalance >=0

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture