Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Managerial accounting

Authors: ramji balakrishnan, k. s i varamakrishnan, Geoffrey b. sprin

1st edition

471467855, 978-0471467854

More Books

Students also viewed these Databases questions

Question

9-2 List the steps in the model of cognitive decision making.

Answered: 1 week ago

Question

price of the motortake? price of the motortake

Answered: 1 week ago

Question

What are the three deficiencies of financial measures?

Answered: 1 week ago