The Wise Owl logo (an owl and the company name)

Our training courses

Other training resources

Our training venues

Why we are different

Details for ubatu05

ubatu05 has participated in the following threads:

Added by ubatu05 on 05 Sep 2021 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

  

 

Head office

Kingsmoor House

Railway Street

GLOSSOP

SK13 2AA

London

Landmark Offices

99 Bishopsgate

LONDON

EC2M 3XD

Manchester

Holiday Inn

25 Aytoun Street

MANCHESTER

M1 3AE

© Wise Owl Business Solutions Ltd 2025. All Rights Reserved.

End of small page here
Please be aware that our website uses cookies!
I'm OK with this Tell me more ...