Question
Write a stored procedure called array_date that takes in as input up to 31numbers in an array - and - an array of up to
Write a stored procedure called array_date that takes in as input up to 31numbers in an array - and - an array of up to 12 numbers and then returns the day of the week for each day in the first array for each month in the second 31 numbers array.
second array.
For instance: If I call array_date([1, 5, 7], [2, 4]) the output would be:
numbers array Tuesday, February 1, 2022
Saturday, February 5, 2022
Monday, February 7, 2022
Friday, April 1, 2022
Tuesday, April 5, 2022
Thursday, April 7, 2022
2. Write a stored procedure called name_fun which will go through eachlast_name in the employees table and do the following:- If the name starts with a vowel - ignore the name (use CASE function)- If the name does not being with a vowel - replace all vowels in the name with a '*'- Right pad each name with a '+' so that each name printed as 15 characters in total
Example: Adamson - would be ignoredSmith - would become Sm*th++++++++++
For the purposes of this assignment the vowels are: a, e, I, o, u
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Solution Here is the SQL code for the stored procedure arraydate CREATE PROCEDURE arraydate days IN INTEGER ARRAY months IN INTEGER ARRAY RETURNS VARCHAR255 AS BEGIN DECLARE results VARCHAR255 ARRAY D...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