557 attributed reviews in the last 3 years
Refreshingly small course sizes
Outstandingly good courseware
Whizzy online classrooms
Wise Owls only (no freelancers)
Almost no cancellations
We have genuine integrity
We invoice after training
Review 30+ years of Wise Owl
View our top 100 clients
This exercise is provided to allow potential course delegates to choose the correct Wise Owl Microsoft training course, and may not be reproduced in whole or in part in any format without the prior written consent of Wise Owl.
This will generate the database that you'll need to use in order to do this exercise (note that the database and script are only to be used for exercises published on this website, and may not be reused or distributed in any form without the prior written permission of Wise Owl).
Strangely there is no function that can return the name of a month when given a number 1 to 12. Luckily for you that is exactly what we will do (the rest of this exercise explains how!).
The function you make will only produce one month name. When it's working properly try looping through number 1 to 12.
The layout for creating a function is very close to that for a stored procedure with a parameter, but with an extra part to specify the data type returned:
CREATE FUNCTION FunctionName
--The calculation goes here
To turn a month number into a month name we need to recreate a DATE to do that use the following code.
There are any number of ways to return the month name - feel free to use a different one.
Test that your function is working by passing in several month numbers separately.
Optionally save this as Month Name function.sql and close it down.
25 Aytoun Street