Question: 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: Using SQL server how would I check that these values are returned

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

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