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).
The aim of this exercise is to find this and that in the EventDetails column (in that order). Your final query should show this:
There are 3 rows containing both words, but these are the only 2 containing them in the right order.
You should find the CHARINDEX function useful. Here's an example:
This would return 8, since Trump begins in Donald Trump at the 8th character (starting from 1).
When you've got this working (and it's fiddly), save this as This and that, then close it down.
|When:||02 Jul 23 at 00:49|
Query_Sol. for MySQL users
-- In MySQL, the equivalent function to the CHARINDEX is LOCATE
SELECT EventName, EventDate,
LOCATE('this', EventDetails) AS thisPosition,
LOCATE('that', EventDetails) AS thatPosition,
(LOCATE('that', EventDetails) - LOCATE('this', EventDetails)) AS 'Offset'
LOCATE('this', EventDetails) > 0
AND LOCATE('that', EventDetails) > 0
AND LOCATE('that', EventDetails) > LOCATE('this', EventDetails);
25 Aytoun Street