I have to get shift key from Dimension table where Shift start and end time maintained for months according to the warehouse and Plant, for the employee who are working in that shift.
I have multiple Transactions Datetime field, completed by employee in day. what i am doing is using range like below
dsh.Warehouse =soc.WarehoueId AND dsh.Plant =soc.PlantOd
AND TransactionTime >=dsh.Shift_Start_DateTime AND TransactionTime< dsh.Shift_End_DateTime
Using this condition also using between, the query runs very slow and take lot of time. Please help me here and suggest what step i can take to overcome this problem. Let me know if any other way i can get the shift code.
Thanks and Regards,