Viewing 15 posts - 1 through 15 (of 75 total)
Jonathan, OMG you are kidding me..... I tried a bunch of things but not a >
Thank you so much !
October 18, 2023 at 5:47 pm
Jeff, Perfect ! thanks so much for the help, I will run with this and see how it goes when moving to the next month.
but this looks great.
July 3, 2023 at 3:42 pm
Jeff, there are 7 ovens only. I only want to count the [Run end Time], so if that falls on the beginning of next month then exclude it.
i.e the [Run...
July 3, 2023 at 2:50 am
Noted ! - Please find my code and data posted below :
--===== If the test table already exists, drop it IF OBJECT_ID('TempDB..#mytable','U')...
June 5, 2023 at 10:26 pm
Bingo !! Ed
That did the trick, I don't think I will ever have a values above 10000 so I will go with this
SELECT CAST(SUM(@OrigWeight/20000.0)*10 AS decimal(10,2)) Tons
October 20, 2022 at 9:22 pm
error happens when adding a decimal to this number 2000.0 as per above recommendation to address incorrect sum value.
SELECT SUM(CAST(OrigWeight /2000.0 AS...
October 20, 2022 at 9:16 pm
Thanks - changed it however Im now getting this error, tried changing the decimal(10,2) decimal(18,4) and others
Msg 8115, Level 16, State 8, Line 54
Arithmetic overflow error converting nvarchar...
October 20, 2022 at 7:51 pm
Eddie, that helped big time - thank you.
Pivot is working well, Initially the sum of the Dry column seems to only pick up the first value for dry. I looked...
August 3, 2022 at 2:34 am
Only 5 columns ....That was a typo on the insert script. pls ignore.
The negative tons are created by a convey belt scale , not...
November 30, 2021 at 5:03 pm
I added sample data above related to the duplicate record, let me know if what I gave here is ok.
November 21, 2021 at 2:58 pm
Ok got it , I tried the .sql type and it didnt like it , so I zipped it . thanks.
anyhow here it is....
USE [SSSPlants]GO/****** Object: ...
November 17, 2021 at 2:27 am
Thanks for your patience....Yes , I've attached a file with some sample records from the source table [dbo].[tons_per_hour] that the above script uses .
The sample includes the records from...
November 16, 2021 at 8:38 pm
Thanks . I did try both recommendations on the varchar (30) and removed the datet range "between" and used this,
and [datetime] >= @start and ...
November 12, 2021 at 9:37 pm
I've been using the script you helped me with above. and its been working well, however every now and then it throws an anomaly . seems to duplicate a record...
November 10, 2021 at 7:35 pm
Steve, wow - thank you - That works ! would not have figured that one out, but learning all the time.
October 20, 2021 at 2:10 pm