Question: ( 4 0 Points ) Write a Stored Procedure to Parse Names Create a stored procedure, parse _ name, which accepts a string representing names

(40 Points) Write a Stored Procedure to Parse Names
Create a stored procedure, parse_name, which accepts a string representing names and returns the first name, last name, and title. The format of the input string will be one of the following:
FIRST_NAME LAST_NAME TITLE
LAST_NAME, FIRST_NAME TITLE
Your procedure should:
Return the first name and last name in uppercase.
Preserve the original case for the title.
Handle names in both formats described above.
Examples of valid inputs:
1.Jane Doe Ms.
2.Doe, Jane Ms.
The procedure should return JANE for first name, DOE for last name, and Ms. for title.
Exception Handling: Your procedure should raise exceptions if any of the three components (first name, last name, or title) are missing. Display a message indicating that the input string is invalid.
Examples of invalid inputs (should generate an error):
1.Doe
2.Jane Doe
3.Doe, Jane
Testing: Create an anonymous block that accepts a name string, calls the parse_name procedure, and prints the title, first name, and last name

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 Programming Questions!