Viewing 15 posts - 481 through 495 (of 844 total)
It's Friday so maybe I'm not thinking about this correctly. But you are just trying to count the number of workdays between two dates, Correct? Excluding the holidays you listed...
-------------------------------------------------------------
we travel not to escape life but for life not to escape us
Don't fear failure, fear regret.
October 20, 2017 at 8:26 am
This code will get you close. Maybe you or someone else can start with this to figure out how to be able to set it up to handle multiple tables. ...
-------------------------------------------------------------
we travel not to escape life but for life not to escape us
Don't fear failure, fear regret.
October 19, 2017 at 10:05 am
-------------------------------------------------------------
we travel not to escape life but for life not to escape us
Don't fear failure, fear regret.
October 18, 2017 at 3:32 pm
I modified your data and tried to use ChrisM's code. I added a value to C2 in #T3, Chris's code still says C2 is NULL on all 3 tables. I...
-------------------------------------------------------------
we travel not to escape life but for life not to escape us
Don't fear failure, fear regret.
October 18, 2017 at 9:23 am
Since your 3 tables have the same layout couldn't you union them together into one table then check that one table's columns for NULL?
If you are working with...
-------------------------------------------------------------
we travel not to escape life but for life not to escape us
Don't fear failure, fear regret.
October 13, 2017 at 2:00 pm
Your statement:
Nested case stmt
(case when gn.glacctid = 25 then t.amex end ) +
(case when gn.acctid = 26 then t.vmc end) +
case when gn.acctid = 22 the...
-------------------------------------------------------------
we travel not to escape life but for life not to escape us
Don't fear failure, fear regret.
October 13, 2017 at 1:44 pm
What about using what I like to call a 'stacked' table to put this in? You use the unpivot, in combination with a prior post on getting the column names. ...
-------------------------------------------------------------
we travel not to escape life but for life not to escape us
Don't fear failure, fear regret.
September 28, 2017 at 9:58 am
IMHO, never ever use spaces. Use underscores to make it more readable to the users. I prefer underscores to camel, but I usually follow what the 'standard' is for the...
-------------------------------------------------------------
we travel not to escape life but for life not to escape us
Don't fear failure, fear regret.
September 26, 2017 at 3:29 pm
I would not pay for anything, if the company wants me to try something then they can pay for it. If I was asked to pay for a mistake I...
-------------------------------------------------------------
we travel not to escape life but for life not to escape us
Don't fear failure, fear regret.
August 29, 2017 at 8:42 am
IMHO I would try removing the SUM and group by from the 'meat' SQL, since you are summing the data in the other SQL. I'm not saying it will help...
-------------------------------------------------------------
we travel not to escape life but for life not to escape us
Don't fear failure, fear regret.
August 1, 2017 at 12:50 pm
Here is what I've used to search for fields within SSIS packages(dtsx files) stored in the MSDB database.
--Connect to database: msdb
SELECT [name] AS SSISPackageName,
-------------------------------------------------------------
we travel not to escape life but for life not to escape us
Don't fear failure, fear regret.
July 26, 2017 at 7:32 am
I guess I wanted this because of the reason I needed it last year. I used to have my work email address associated with my account. Password was being saved...
-------------------------------------------------------------
we travel not to escape life but for life not to escape us
Don't fear failure, fear regret.
July 3, 2017 at 9:53 am
If you want to do it with Substring and CHARINDEX here you go.
<SQL>
DECLARE @testVARCHAR(500);
SET @test-2 = 'http://stable-test.test.net/api/files/fs.testcollection/TP-0000000.pdf/download/';
SELECT SUBSTRING(@test,
CHARINDEX('/', @test-2, CHARINDEX('/', @test-2, CHARINDEX('/', @test-2,...
-------------------------------------------------------------
we travel not to escape life but for life not to escape us
Don't fear failure, fear regret.
June 22, 2017 at 11:58 am
The same query...
-------------------------------------------------------------
we travel not to escape life but for life not to escape us
Don't fear failure, fear regret.
June 21, 2017 at 1:26 pm
I think this would work.
SELECT SUBQ.issue_number, SUBQ.type_code, SUBQ.alt_type_code,
SUM(SUBQ.data_value_1) AS data_value_1_sum,
SUM(SUBQ.data_value_2) AS data_value_2_sum
FROM (SELECT issue_number, line_number, type_code,
CASEWHEN alt_type_code IN ('NONE', '')
THEN '00'...
-------------------------------------------------------------
we travel not to escape life but for life not to escape us
Don't fear failure, fear regret.
June 20, 2017 at 12:21 pm
Viewing 15 posts - 481 through 495 (of 844 total)