Question: 2. Create a table UserPermissions (provide create and insert statements code) (5 points for the correct code of the procedure and 3 points for testing

2. Create a table UserPermissions (provide create and insert statements code) (5 points for the correct code of the procedure and 3 points for testing your function; one point per test case). Do not modify table or column names.

Document

UserName

Policy

SYSTEM

Menu

JDOW

W2

USAM

Permissions

SYSTEM

W2

JDOW

Form 1040

USAM

Policy

JDOW

W2

SYSTEM

Write a PL/SQL stored procedure that takes the username as input and returns a number of documents that the user has permissions to view. If the username is not in the table, your procedure should return: "no documents for USERNAME".

The number of documents has to be displayed as a word instead of using digits. To convert a number to words read http://viralpatel.net/blogs/convert-number-into-words-oracle-sql-query/

Include code that can be copied and ran, and screenshots of the results. Do not forget to test the "user not found" case.

Sample output:

Please use Oracle SQL developer for this question.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!