SQL | Archived exercise | Script view showing 2000 events

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.

Software ==> SQL  (198 exercises)
Version ==> Any version of SQL Server
Topic ==> Archived  (70 exercises)
Level ==> Relatively easy
Subject ==> SQL training
Before you can do this exercise, you'll need to download and unzip this file (if you have any problems doing this, click here for help).

You need a minimum screen resolution of about 700 pixels width to see our exercises. This is because they contain diagrams and tables which would not be viewable easily on a mobile phone or small laptop. Please use a larger tablet, notebook or desktop computer, or change your screen resolution settings.

Create a new query, and within this create a view called vwSingleYear to show all those events occurring in 2000.  Your query should begin like this:

SQL exercise - Views (image 1)

The start of a query to create a view

Execute this query, then right-click on your Views to refresh them.  You should now see your new view!

Run this view - it should show 8 events:

SQL exercise - Views (image 2)

In no particular order ...

Right-click on the view to modify its design, and use the View Design window to change the criteria so that you show the events in 2001 instead (there should be 7 of them).

Close the view down, saving your changes.

You can unzip this file to see the answers to this exercise, although please remember this is for your personal use only.
This page has 0 threads Add post