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
549 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 ...
As well as a series of 30 or so videos showing you how to program in SQL (from writing simple queries through to creating complicated stored procedures), we've also got videos on how to install and use SQL Server 2016.
Category | Videos |
---|---|
12 |
|
18 |
|
9 |
|
3 |
Just click on any of the links above to see a complete listing for that category of SQL videos.
From: | ubatu05 |
When: | 05 Sep 21 at 01:47 |
Hello Andrews,
Please I have been following your sql tutorials on YouTube and I appreciate your unique teaching program.
I have a problem and hope you can assist me. Here is my problem;
I have an Event table with these columns;
EventID EventDate W1 W2 W3 W4 W5 M1 M2 M3 M4 M5
1 20-1-1962 1 2 3 4 5 6 7 8 9 10
2 21-1-1962 3 8 31 40 21 42 25 1 11 5
3 22-1-1962 14 21 41 56 1 42 32 31 5 67
Problem: 1. Where W1=1 in an Event, Select the next one event and previous one event. Event to select could be anything 2,3,4 or any specified envent
that is if a column in an event contain a specified number, select the previous event and the next specified event.
Problem 2. How do I iterate through the entire database and select these events and have it stored as a procedure?
Isaac
From: | Andrew G |
When: | 06 Sep 21 at 07:06 |
Hi Isaac,
You can use the Lag and Lead methods to do this
https://docs.microsoft.com/en-us/sql/t-sql/functions/lag-transact-sql?view=sql-server-ver15
https://docs.microsoft.com/en-us/sql/t-sql/functions/lead-transact-sql?view=sql-server-ver15
I hope it helps!
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.