SQL Grouping Issues -


I am trying to write a question that will return to any customer who is separate with different work orders. Separate days of the week fall. For every customer, every work order should fall on the same day of the week so that I want to know why this is not the case, so I can fix it.

The name of the table is the core. Work order, and there is a column called Customer Id, which specifies which customer is related to each work order, there is a column in the TimeWindowStart which can be used to see what day of each work order falls (I To do this, I am using DATENAME (time of week, time-window start).

Any idea how to write this query?

Thank you!

  select where workaround exists (where 1 to 1 of work order Select W1 and W1.CustomerId = W.CustomerId and DatePort (dw, W1.TimeWindowStart) <> DatePort (dw, W.TimeWindowStart))    

Comments