Viewing 15 posts - 661 through 675 (of 1,246 total)
July 18, 2017 at 12:24 pm
Check out this article from Itzik Ben-Gan (and the function that he's created)... How to Compute Date and Time Difference in Parts
July 11, 2017 at 4:01 pm
By "Windows Function", I'm assuming you mean "Windowed Function"... The kind with an OVER clause...
Windowing a function typically involves sorting data which tends to be one of the more...
July 6, 2017 at 12:15 pm
What is the actual data type of your "date field"?
June 30, 2017 at 10:40 am
June 28, 2017 at 3:44 pm
Given the context (the Kimball method of DW), the intention is that any time you actually need a date, you join to the dim_Date table and get the actual date...
June 27, 2017 at 10:52 am
Something like this...
DECLARE @DateAsInt INT = 20170625;
SELECT
DateAsDate = DATEFROMPARTS(SUBSTRING(dc.DateAsChar, 1, 4), SUBSTRING(dc.DateAsChar, 5, 2), SUBSTRING(dc.DateAsChar, 7, 2))
FROM
( VALUES (CAST(@DateAsInt AS...
June 26, 2017 at 1:00 pm
June 21, 2017 at 2:59 pm
That's where I'm VERY VERY lucky... It was ordained from up on high, long ago, that applications may only call procs... No app generated, ad-hoc code allowed.
There "may" be...
June 21, 2017 at 2:05 pm
June 21, 2017 at 1:53 pm
See if something like the following will work for you.
Test data...
IF OBJECT_ID('tempdb..#TestData', 'U') IS NOT NULL
DROP TABLE #TestData;
CREATE TABLE #TestData...
June 21, 2017 at 1:42 pm
Using an iTVF that produces a scalar value certainly works as a work around, at least in new development... The biggest problem is with existing code. It would be nice...
June 21, 2017 at 1:07 pm
June 21, 2017 at 8:15 am
June 20, 2017 at 11:42 pm
Here's a quick & dirty test to demonstrate the difference (and show that you can get similar performance w/o having to create an actual function).
declare @Products...
June 20, 2017 at 11:04 pm
Viewing 15 posts - 661 through 675 (of 1,246 total)