Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Given the database table schema below, write a stored procedure called SP Showwx

ID: 3826922 • Letter: G

Question

Given the database table schema below, write a stored procedure called SP Showwx Alert. This stored procedure will accept two arguments. The first argument will be the county (represented by the counties' field) and the second argument will be the event type (represented by the 'event type' field). Each of these arguments will use the SQL LIKE' clause so that a user of this stored procedure can enter a partial county name and a partial event type. The student can implement this by using the source below as an example WHERE data like CONCAT C'% arg1. The stored procedure will return log dt, event type, and expire time from the table below based on the parameters passed into the stored procedure. You will create this stored procedure in a text file that can be run using the MysOL source' command. This file will be named SP showwxAlert.txt and will be included in a ZIP file Be sure to account for the proper handling of the delimiter in the script file as well as the proper use of the database

Explanation / Answer

CREATE PROCEDURE SPShowWXAlert @counties varchar(150), @event_type varchar(60), @long_dt varchar(25) output, @event_type varchar(60)output @expire_time varchar(25)output AS BEGIN select @long_dt=Long_dt, @event_type= Event_type , @expire_time =Expire_time from wx_alerts where counties like (%@counties%)and event_type like(%@event_type%) END;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote