Viewing 15 posts - 166 through 180 (of 386 total)
March 10, 2017 at 12:54 pm
March 9, 2017 at 1:13 pm
DROP FUNCTION IF EXISTS dbo.FancyDateDiff;
go
CREATE FUNCTION dbo.FancyDateDiff
...
March 9, 2017 at 12:14 pm
March 8, 2017 at 2:47 pm
SELECT CAST(ABS(CAST(CAST(FirstDate AS DATETIME) AS INT) - CAST(CAST(SecondDate AS DATETIME) AS...March 8, 2017 at 2:09 pm
This appears to work
DECLARE @mytable TABLE(ColumnA INT, ColumnB CHAR(1))
INSERT...
March 3, 2017 at 10:08 am
March 3, 2017 at 8:36 am
DENSE_RANK() OVER(PARTITION BY ColumnA ORDER BY ColumnB) +
DENSE_RANK() OVER(PARTITION BY ColumnA ORDER...
March 3, 2017 at 8:33 am
Actually, let me clarify it a bit more and simplify the situation more succinctly:
March 3, 2017 at 5:45 am
SELECT a.*
FROM dbo.ComplexQuery AS a
WHERE COUNT(DISTINCT ColumnD) OVER(PARTITION...
March 3, 2017 at 5:28 am
March 3, 2017 at 5:27 am
While I've most likely forgotten a number of them, these are the ones that stick out in my mind most readily:
BASIC (DEC...
February 24, 2017 at 6:53 am
If, however,...
February 10, 2017 at 3:16 pm
Since Steve was kind enough to re-post this in today's daily email, I just now was able to read this posting. Nice job Gail!
While the purpose of the...
February 10, 2017 at 1:28 pm
Blech! I knew the right answer but clicked the wrong option. Goes to prove that jumping too quickly to answer without double-checking can be hazardous!
January 4, 2017 at 5:40 am
Viewing 15 posts - 166 through 180 (of 386 total)