1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Zarrin [17]
3 years ago
13

Write a script that declares and sets a variable that’s equal to the total outstanding balance due. If that balance due is great

er than $10,000.00, the script should return a result set consisting of VendorName, InvoiceNumber, InvoiceDueDate, and Balance for each invoice with a balance due, sorted with the oldest due date first. If the total outstanding balance due is less than $10,000.00, return the message "Balance due is less than $10,000.00."
Computers and Technology
1 answer:
nataly862011 [7]3 years ago
4 0

Answer:

see explaination

Explanation:

SCRIPT :

drop table Vendor;

create table Vendor (VendorName varchar2(20), InvoiceNumber number (20), InvoiceDueDate date, Balance number(32,6));

insert into VENDOR (VENDORNAME,INVOICENUMBER,INVOICEDUEDATE,BALANCE) values ('ABC',121,TO_TIMESTAMP('01-01-18','DD-MM-RR HH12:MI:SSXFF AM'),1000);

Insert into Vendor (VENDORNAME,INVOICENUMBER,INVOICEDUEDATE,BALANCE) values ('XYZ',1212121,to_timestamp('02-01-18','DD-MM-RR HH12:MI:SSXFF AM'),100000);

declare

cursor c1 is select * from Vendor;

begin

for i in c1

loop

if I.BALANCE < 1001 then

DBMS_OUTPUT.PUT_LINE('Vendor Name '||I.VENDORNAME||', Invoice Number '||I.INVOICENUMBER||', Invoice DueDate '||I.INVOICEDUEDATE||',BALANCE '||I. BALANCE);

else

dbms_output.put_line('Vendor Name '||i.VendorName||', Invoice Number '||i.InvoiceNumber||', Invoice DueDate '|| i.InvoiceDueDate||' Balance due is less than $1000');

end if;

end LOOP;

end;

output : SCRIPT OUTPUT

table VENDOR dropped.

table VENDOR created.

1 rows inserted.

1 rows inserted.

anonymous block completed

dbms output :

Vendor Name ABC, Invoice Number 121, Invoice DueDate 01-JAN-18,BALANCE 1000

Vendor Name XYZ, Invoice Number 1212121, Invoice DueDate 02-JAN-18 Balance due is less than $1000

You might be interested in
Different units of CPU ?
deff fn [24]
The two typical components of a CPU include the following:<span>--The arithmetic logic unit (ALU), which performs arithmetic and logical operations. --<span>The control unit (CU), which extracts instructions from memory and decodes and executes them, calling on the ALU when necessary.</span></span>
3 0
3 years ago
Place Letter or word in correct section where it says labels bellow
love history [14]
A beauty its not b c or d
3 0
3 years ago
Read 2 more answers
Dustin is editing a SmartArt graphic. He wants all three shapes to be different colors.
lilavasa [31]

Answer:

click on Design tab → select associated shape → adjust color

Explanation:

I think it is that but i'm not positive. I will know in a little bit since I am taking the test right now.

6 0
4 years ago
What does a controller control?
ruslelena [56]

Answer:

b. the interface between the hard disk and the system bus

Explanation:

A controller, in the most basic computing terms, is a hardware chip or card that falls between two hardware components. Thus, a computer’s motherboard will always have a controller that interfaces with RAM, hard disk, DVD drives or other hardware components. Being an interface between two hardware devices facilitate incoming and outgoing commutations. Option B therefore, is the correct answer because it interfaces between the hard disk and sytem bus, which are both hardware components.

8 0
3 years ago
The Zoom slider will allow users to _____.
NeX [460]
The Zoom slider will allow users to change the way the document appears on the screen
3 0
3 years ago
Read 2 more answers
Other questions:
  • Consider this data sequence: "3 11 5 5 5 2 4 6 6 7 3 -8". Any value that is the same as the immediately preceding value is consi
    6·1 answer
  • Select the guidelines you should follow when creating a resume
    12·2 answers
  • 1. If your motherboard supports DIMM memory, will RIMM memory still work<br>on the board?​
    13·1 answer
  • Please write a complete program to calculate monthly payment given
    15·1 answer
  • Websites whose URL’s contain tildes (~) are usually published by the government. TRUE or FALSE.
    8·2 answers
  • Why is it so important to have employees who can critically think?
    7·2 answers
  • What is fair use?
    15·2 answers
  • Select the correct answer from each drop-down menu.
    8·1 answer
  • At one college, the tuition for a full-time student is $6,000 per semester. It has been announced that the tuition will increase
    7·1 answer
  • PLEASE SOMEONE PLEASE HELP ME OUT!!!!
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!