Viewing 15 posts - 16 through 30 (of 75 total)
Got it .....
I ended up using the min/max totals and some grouping
thanks for the help.
September 9, 2021 at 4:35 pm
Thanks , I ran your query and it doesn't capture exactly what I need.....
So obviously there are multiple records per day for each product, in fact every 15 mins the...
September 8, 2021 at 9:53 pm
Agreed, I should have given data and the Table code please see below...
Thanks !
CREATE TABLE [dbo].[tons_produced](
[datetime] [datetime] NOT NULL,
[whsecd] [int] NOT NULL,
[plant] [varchar](20) NOT NULL,
[meshtype] [varchar](20) NOT...
September 8, 2021 at 5:12 pm
yes, that GetDateCDT is a function to get CST.
My question was really more about how to deal with the start and end totals. and how to to work CASE WHEN...
September 8, 2021 at 2:01 pm
OMG !!
Wow .....the cross apply worked like a Charm. and it was quick , even though now checking the table index is Clustered on identity, I will go ahead and...
July 2, 2021 at 9:10 pm
Scott, thanks.
Not sure that would work in our case, also not quite sure it it would address the ability to suppress certain reports and reset etc.
May 2, 2021 at 1:43 am
Brian,
Thank you for the ideas around the approach. we don't have Redgate unfortunately
I've followed your suggestion on the merge table with the bit "Alert sent" column. I think that will...
May 2, 2021 at 1:39 am
Thanks to everyone for their input , I'm going to go with the weekend steps first, and then circle back and revert to the above recommendations on the Public holiday...
March 13, 2021 at 4:42 pm
Scott, My bad .....
I just didn't see that particular one....That's exactly what I needed. many thanks !
March 12, 2021 at 4:32 pm
Good Point Sergiy.
Public holidays are also excluded. , but right now Id just like to solve the weekends and then see if there is a solution for hoildays as well.
thanks
March 12, 2021 at 3:00 pm
Thank you for your guidance and reformatting this...it is helpful.
However the main calculation that I'm looking for is to figure out how to add the days and exclude the weekend...
March 12, 2021 at 2:49 pm
Thanks for the input. after your comments , I went and looked at the query executions' plan and based on that added an uncluttered index and Boom. that worked great.
Thanks...
March 11, 2021 at 2:07 pm
Hi ,
I initially thought the "where not exist" was working but it is not....
I have only one new customer this year , and the below query is returning many records....
February 4, 2021 at 4:59 pm
Thank you.. I was only able to get to this today.
I ran this and its seems to be what I needed.
January 21, 2021 at 10:09 pm
Unreal !!
I wont tell you how much time I spent on this.....double checked everything, but didn't see that - Couldn't see the wood for the trees.
Thank you so much.
January 19, 2021 at 9:02 pm
Viewing 15 posts - 16 through 30 (of 75 total)