Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I was given the following code to run for testing for the procedures and functions made: / * File: chaudadeDBAS 3 2 1 0 0
I was given the following code to run for testing for the procedures and functions made:
File: chaudadeDBASAssignmentsql
Author: Adeem Chaudhry
Oracle Username: Schaudade
Description: Testing Script
Undefine variables to prompt for inputs again
UNDEFINE customerno
UNDEFINE orderdate
UNDEFINE partnumbers
UNDEFINE orderprice
UNDEFINE orderqty
UNDEFINE invoicedate
UNDEFINE shipqty
Prompt for input
ACCEPT customerno NUMBER PROMPT 'Enter customer number: ;
ACCEPT orderdate DATE PROMPT 'Enter order date YYYYMMDD: ;
ACCEPT partnumbers CHAR PROMPT 'Enter part numbers: ;
ACCEPT orderprice NUMBER PROMPT 'Enter order price: ;
ACCEPT orderqty NUMBER PROMPT 'Enter order quantity: ;
ACCEPT invoicedate DATE PROMPT 'Enter invoice date YYYYMMDD: ;
ACCEPT shipqty NUMBER PROMPT 'Enter ship quantity: ;
Variables
DEFINE customerno &customerno
DEFINE orderdate &orderdate'
DEFINE partnumbers &partnumbers'
DEFINE orderprice &orderprice
DEFINE orderqty &orderqty
DEFINE invoicedate &invoicedate'
DEFINE shipqty &shipqty
Test creating a failed order
VAR orderno NUMBER;
VAR status VARCHAR;
EXEC storeneworder&customerno TODATE&orderdate', YYYYMMDD&partnumbers', &orderprice, &orderqty :orderno :status;
PRINT status;
Test creating a correct order
EXEC storeneworder&customerno TODATE&orderdate', YYYYMMDD&partnumbers', &orderprice, &orderqty :orderno :status;
PRINT status;
Display the newly created order
EXEC Sshdisplayorder:orderno;
Test creating a failed invoice
VAR invoiceno NUMBER;
EXEC storenewinvoice:orderno TODATE&invoicedate', YYYYMMDD&partnumbers', &shipqty :invoiceno :status;
PRINT status;
Test creating two invoices with partially shipped products
EXEC storenewinvoice:orderno TODATE&invoicedate', YYYYMMDD&partnumbers', &shipqty :invoiceno :status;
PRINT status;
Display the newly created invoices
EXEC Sshdisplayinvoice:invoiceno;
Rollback
ROLLBACK;
Commit the final submission
COMMIT;
Output begins
Output from executing the insertorder procedure:
Output ends
This is the outputerror I get:
Error starting at line : in command
BEGIN storeneworder I :orderno :status; END;
Error report
ORA: line column :
PLS: identifier I must be declared
ORA: line column :
PLSQL: Statement ignored
"line s column s:
s
Cause: Usually a PLSQL compilation error.
Action:
STATUS
Error starting at line : in command
BEGIN storeneworder I :orderno :status; END;
Error report
ORA: line column :
PLS: identifier I must be declared
ORA: line column :
PLSQL: Statement ignored
"line s column s:
s
Cause: Usually a PLSQL compilation error.
Action:
STATUS
PLSQL procedure successfully completed.
Error starting at line : in command
BEGIN storenewinvoice:orderno I :invoiceno :status; END;
Error report
ORA: line column :
PLS: identifier I must be declared
ORA: line column :
PLSQL: Statement ignored
"line s column s:
s
Cause: Usually a PLSQL compilation error.
Action:
STATUS
Error starting at line : in command
BEGIN storenewinvoice:orderno I :invoiceno :status; END;
Error report
ORA: line column :
PLS: identifier I must be declared
ORA: line column :
PLSQL: Statement ignored
"line s column s:
s
Cause: Usually a PLSQL compilation error.
Action:
STATUS
PLSQL procedure successfully completed.
Rollback complete.
Attached is the schema used for the procedures and function and this script was tasked to complete the following:
Write a testing script that uses substitution parameters to perform the following:
Using substitution variables, execute the stored procedure from step # to create:
a failed order
a correct order with at least products
Execute Sshdisplayorder to display your newly created order
Using substitution variables. execute the stored procedure from step # to create:
a failed invoice
two invoices using the newly created order and partially shipped products
Execute Sshdisplayinvoice to display your newly created invoices
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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