Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a procedure that insert paid invoices from the paid_invoices table into the invoice_archive table. Only those paid invoices that are older than or equal

Write a procedure that insert paid invoices from the "paid_invoices" table into the "invoice_archive" table.

Only those paid invoices that are older than or equal to 31-05-2014 should be transferred.

Those transferred invoices should be deleted from "paid_invoices" table.

"Paid_invoices" and "invoice_archive" tables have the following columns and data types

image text in transcribed

**** EDIT ****

The invoice_id is a number like (33) and the Primary Key

The invoice_number is a varchar2 like ('Qb3295jd')

+NULLABLE DATA-DEFAULT )COLUMN-ID COMMENTS COLUMN NAME DATA TYPE NUMBER NUMBER 1 INVOICE ID 2 VENDOR ID 3 INVOICE_NUMBER VARCHAR2 (50 BYTE) No 4 INVOICE DATE 5 INVOICE TOTAL NUMBER (9,2) 6 PAYMENT_TOTAL NUMBER (9,2) 7 CREDIT TOTAL 8 TERMS ID 9 INVOICE DUE DATE DATE (null) (null) (null) (null) (null) 1 (null) 2 (null) 3 (null) 4 (null) 5 (null) 6 (null) 7 (null) 8 (null) 9 (null) 10 (null) No DATE No Yes Yes No No Yes NUMBER (9,2) NUMBER. (null) (null) (null) 10 PAYMENT DATE DATE

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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_2

Step: 3

blur-text-image_3

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

Learn To Program Databases With Visual Basic 6

Authors: John Smiley

1st Edition

1902745035, 978-1902745039

More Books

Students also viewed these Databases questions