Avatar of Murray Brown
Murray Brown
Flag for United Kingdom of Great Britain and Northern Ireland asked on

SQL Timeout Error

Hi

If I run the following query I get a timeout error with [Shaft] = 'tshepong air' but with any other Shaft eg [Shaft] = 'kopanang air' I get no error even where there is a lot more data.

What could cause this?

Select [COY],Sum([M Shift]) As [M Shift], Sum([N Shift]) As [N Shift], Sum([Sick]) As [Sick],  Sum([AWOP]) As [AWOP], Sum([Leave]) As [Leave], Sum([Comp Leave]) As [Comp Leave], Sum([5 Sat Day]) As [5 Sat Day], Sum([5 Sat Night]) As [5 Sat Night], Sum([6 Sat Day]) As [6 Sat Day], Sum([6 Sat Night]) As [6 Sat Night] , Sum([PPH]) As [PPH], Sum([Shift Worked In Day]) As [Shift Worked In Day], Sum([Shift Worked In Night]) As [Shift Worked In Night], Sum([Lesedi Training]) As [Lesedi Training], Sum([Mine Training]) As [Mine Training], Sum([IOD]) As [IOD] From [vTimesheets] Where [Day] >= '2018-11-16' And [Day] <='2018-11-30' And [Shaft] = 'tshepong air' Group By [COY]

Open in new window

SQL

Avatar of undefined
Last Comment
Murray Brown

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Russ Suter

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Pavel Celba

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Murray Brown

ASKER
Thanks very much for the help. Sorry abut the late reply
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck