Read our blogs, tips and tutorials
Try our exercises or test your skills
Watch our tutorial videos or shorts
Take a self-paced course
Read our recent newsletters
License our courseware
Book expert consultancy
Buy our publications
Get help in using our site
551 attributed reviews in the last 3 years
Refreshingly small course sizes
Outstandingly good courseware
Whizzy online classrooms
Wise Owl trainers 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
Search our website
We also send out useful tips in a monthly email newsletter ...
Software ==> | SQL (203 exercises) |
Topic ==> | Basic joins (12 exercises) |
Level ==> | Relatively easy |
Subject ==> | SQL training |
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.
If you haven't already done so, run the script in the folder above to generate the Doctor Who database.
Right-click in a new query and use the designer to create a query linking these two tables:
Each episode is linked to the person who wrote it.
Add columns and filters to your query so that it shows who wrote the "special" episodes (there should be 13 listed out, of which the first few in alphabetical order are shown below):
The first few episodes containing the word special in the title.
For the filter, use the criteria LIKE '%special%'.
Now tidy up the generated query so that it looks more like proper SQL! Here's a suggestion:
-- the query, tidied up
SELECT
tblAuthor.AuthorName,
tblEpisode.Title,
tblEpisode.EpisodeType
FROM
tblAuthor
INNER JOIN tblEpisode ON
tblAuthor.AuthorId = tblEpisode.AuthorId
WHERE
tblEpisode.EpisodeType LIKE '%special%'
ORDER BY
tblEpisode.Title
Save this query as No joins necessary, then close it down.
You can find other training resources for the subject of this exercise here:
From: | Orin |
When: | 11 Feb 24 at 12:23 |
Hello, I can't seem to find out how to set a like filter in the Query designer. If I enter this (with or without ' ') :
I end up with WHERE (tblEpisode.EpisodeType = N'%special%')
I know how to correct it but I may have missed how to do it through this editor.
From: | Andy B |
When: | 12 Feb 24 at 08:25 |
I reverse-engineered it! Select your query which works, right-click on it and choose this option:
You'll see this is what SSMS does:
Good question though ....
Kingsmoor House
Railway Street
GLOSSOP
SK13 2AA
Landmark Offices
99 Bishopsgate
LONDON
EC2M 3XD
Holiday Inn
25 Aytoun Street
MANCHESTER
M1 3AE
© Wise Owl Business Solutions Ltd 2024. All Rights Reserved.