question

rajatj avatar image
rajatj asked

Using Between or range of two datetime field to get shift code from Dim taking lot of time

Hi,

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,

Rajat

date-rangebetween
image001.png (7.5 KiB)
image001.png (7.5 KiB)
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.