Question
Write a procedure that automatically insert the paid invoices from invoices table into the paid_invoices table. Inserted Invoices should be unique ( no duplicate invoices).
Write a procedure that automatically insert the paid invoices from invoices table into the paid_invoices table.
Inserted Invoices should be unique ( no duplicate invoices).
Write a function that check whether or not an invoice exists in paid_invoices.
The "INVOICES" and "PAID_INVOICES" have the same data types.
Only invoices paid in full ( Invoice_total = payment_total + credit_total) should be transferred to "PAID_INVOICES" table
**** EDIT ****
The invoice_id is a number like (33) and the Primary Key
The invoice_number is a varchar2 like ('Qb3295jd')
The same invoice_id can have multiple invoice_numbers
COLUMN_NAME 1 INVOICE_ID 2 VENDOR_ID 3 INVOICE NUMBER 4 INVOICE_DATE 5 INVOICE TOTAL 6 PAYMENT TOTAL 7 CREDIT TOTAL 8 TERMS_ID 9 INVOICE_DUE_DATE 10 PAYMENT DATE DATA_TYPE NUMBER NUMBER No No VARCHAR2 (50 BYTE) No No No Yes Yes No No Yes DATE NUMBER (9,2) NUMBER (9, 2) NUMBER (9, 2) NUMBER NULLABLE DATA_DEFAULT (null) (null) (null) (null) (null) DATE DATE 0 0 (null) (null) (null) COLUMN_ID COMMENTS 1 (null) 2 (null) 3 (null) 4 (null) 5 (null) 6 (null) 7 (null) 8 (null) 9 (null) 10 (null)
Step by Step Solution
3.44 Rating (154 Votes )
There are 3 Steps involved in it
Step: 1
As you mentioned The same invoiceid can have multiple invoicenumbers So your invoiceid cannot be p...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started