Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

https://d2vlcm61l7u1fs.cloudfront.net/media%2F1ab%2F1ab0d823-3496-4c31-9803-dde76c505efa%2FphpDxaxvd.png

**** 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... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction to Algorithms

Authors: Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest

3rd edition

978-0262033848

Students also viewed these Programming questions

Question

Define promotion.

Answered: 1 week ago

Question

Write a note on transfer policy.

Answered: 1 week ago

Question

Discuss about training and development in India?

Answered: 1 week ago

Question

Explain the various techniques of training and development.

Answered: 1 week ago