Answered step by step
Verified Expert Solution
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:
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 beginStep by Step Solution
There are 3 Steps involved in it
Step: 1
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