Link to home
Start Free TrialLog in
Avatar of Murray Brown
Murray BrownFlag 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

ASKER CERTIFIED SOLUTION
Avatar of Russ Suter
Russ Suter

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Murray Brown

ASKER

Thanks very much for the help. Sorry abut the late reply