Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using SQL server how would I check that these values are returned correctly using this code: I've executed the function already which is why now

Using SQL server how would I check that these values are returned correctly using this code: image text in transcribed

I've executed the function already which is why now I'm getting the red line because it already does exist. But I cannot figure out how to test it by passing things like 'mod_cook', 'business', etc. Through it. I don't really know how to test to make sure this works. I tried a Select function but I don't think I have the syntax right to get it to work.

Create Function fn SelectFullTitleTypeS S m513 @Type Char(12)) --list of arguments, has a single argument coming in at typechar Returns NvarChar (50) -will return as AS BEGIN RETURN SELECT CASE @Type WHEN business'THEN 'Business WHEN 'mod_cook THEN 'Modern Cooking WHEN 'popular_comp' THEN 'Popular Computing' WHEN psychology' THEN Psychology WHEN 'trad_cook' THEN 'Traditional Cooking WHEN UNDECIDED' THEN 'Undecided END )this end is the end for Case END This ends the begin

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

More Books

Students also viewed these Databases questions

Question

Write formal proposal requests.

Answered: 1 week ago

Question

Write an effective news release.

Answered: 1 week ago

Question

Identify the different types of proposals.

Answered: 1 week ago