Viewing 15 posts - 271 through 285 (of 3,543 total)
Why not just use a cartesian of possible combinations of start and end day (42 excluding same start and end day) together with the number of days and then do a simple lookup
May 2, 2018 at 2:41 am
April 24, 2018 at 10:59 am
SELECT
DATEDIFF(day, COALESCE(date0,dateStart),date1),
DATEDIFF(day, COALESCE(date1,date0,dateStart),date2),
DATEDIFF(day, COALESCE(date2,date1,date0,dateStart),date3),
DATEDIFF(day, COALESCE(date3,date2,date1,date0,dateStart),date4),
DATEDIFF(day, COALESCE(date4,date3,date2,date1,date0,dateStart),date5),
DATEDIFF(day, COALESCE(date5,date4,date3,date2,date1,date0,dateStart),date6),
DATEDIFF(day, COALESCE(date6,date5,date4,date3,date2,date1,date0,dateStart),date7)
FROM temp
April 24, 2018 at 6:40 am
April 17, 2018 at 6:06 am
April 12, 2018 at 2:02 am
April 3, 2018 at 3:57 am
Obscure variation
REPLACE(LTRIM(REPLACE(REPLACE(REPLACE([value],'000.',''),'.000',''),'0',' ')),' ','0')+'H'
March 29, 2018 at 1:49 am
SELECT a.UserAccounts,a.AccountType,a.BillingAccountKey,b.BillingCode,b.[Rank]
FROM #UserAccount a
CROSS APPLY (SELECT TOP (1) t.BillingCode,r.[Rank]
FROM #BillingTransactions t
JOIN #BillingCodeRank r ON r.BillingCode = t.BillingCode
WHERE...
February 28, 2018 at 5:45 am
February 27, 2018 at 6:07 am
Check the output row count.
IIRC Reporting Services Excel renderer has a worksheet row limit (circa 65K) and will not render if the number of rows exceeds that limit
February 26, 2018 at 6:21 am
February 16, 2018 at 9:55 am
February 16, 2018 at 8:23 am
Viewing 15 posts - 271 through 285 (of 3,543 total)