Viewing 15 posts - 1 through 15 (of 21 total)
Unfortunately, I only have read access to the database at this point. Not sure if that will change. My hope is that if I can find a solution and lay...
September 15, 2021 at 10:17 pm
One technique I use to execute sql in parallel is to dynamically create a sql agent job from within a stored proc. Create however many steps you need but in...
December 24, 2020 at 4:11 pm
The beauty of SQL Agent is its simplicity as a scheduler. We have work flow in SSIS or better yet, just use SQL. I cringe when I see a SQL...
December 22, 2020 at 2:38 pm
I totally agree with you, and I'm frustrated as well, the requirements are still the same, meaning up to 8 hours daily hours goes into REG bucket, over 8 goes...
April 28, 2014 at 3:11 pm
At this point we are beyond help with a tough sql problem. You are trying to solve a payroll problem. When the hours are going over 40 your client wants...
April 28, 2014 at 2:05 pm
Louis,
The OP's requirements are a little complicated. He most likely wants to pay workers at three different rates: Regular, Daily OT, and Weekly OT. For instance $10, $15, and $20...
April 23, 2014 at 1:24 pm
Ok then. Set datefirst 1 should be all you need.
April 23, 2014 at 12:13 pm
set datefirst 7
;with SampleData (PERSON, [DATE], [HOURS], [DOW]) as
(
SELECT 1234,'03/31/2014','8.00','Monday'
UNION ALL SELECT 1234,'04/01/2014','8.00','Tuesday'
UNION ALL SELECT 1234,'04/02/2014','8.00','Wednesday'
...
April 23, 2014 at 8:05 am
Sean, Thanks for pointing me to the article on triangular joins http://www.sqlservercentral.com/articles/T-SQL/61539/. I do not encounter the running total problem very often so I guess I've been lucky in the...
April 22, 2014 at 2:37 pm
with SampleData (PERSON, [DATE], [HOURS], [DOW]) as
(
SELECT 1234,'03/31/2014','8.00','Monday'
UNION ALL SELECT 1234,'04/01/2014','8.00','Tuesday'
UNION ALL SELECT 1234,'04/02/2014','9.00','Wednesday'
UNION...
April 22, 2014 at 7:42 am
A bit of a tricky problem. I don't think you can achieve your result in one statement. However, you can break it up like this:
if OBJECT_ID('tempdb..#filefolders') is not null...
March 28, 2014 at 11:28 am
You need to join your example tables on both columns.
You might also look at using EXCEPT. Something like
select acct, que
from #ABC
except
select acct, que
from #DEF
March 26, 2014 at 7:43 am
You could use this to produce simple html from a select statement:
declare @html nvarchar(max), @table nvarchar(max);
set @html =
N'<html><head><title>Doc Title Goes Here</title></head>' + CHAR(10)
+ N'<body style="font-family: Arial...
March 17, 2014 at 7:58 am
You can either select what you need from the table:
select *
from #t
where TotalCHAR013 is not null and TotalCHAR013 > 0
or delete what you don't need and select all from the...
March 14, 2014 at 2:16 pm
It's in the original table definition. Please post the sql you are using to get your result set?
March 14, 2014 at 2:00 pm
Viewing 15 posts - 1 through 15 (of 21 total)