|
|
-
castling Commented 1 Years ago through Puzzles
@Adam, no, but use other v2012 function
|
-
castling Commented 1 Years ago through Puzzles
@dishdy
v1:
(61968 row(s) affected)
Table 'TC79'. Scan count 6, logical reads 1326, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'Worktable'. Scan count 0, logical reads
|
-
castling Commented 1 Years ago through Puzzles
@dishdy, I agree - 39472793540 and 4995005,78
|
-
castling Commented 1 Years ago through Puzzles
@dishdy
@Adam Tokarski
Yes, windowed sum is problem.
|
-
castling Commented 1 Years ago through Puzzles
and my script (v. 2012)
declare @n1 int
declare @n2 int
declare @factor int
declare @d datetime
set @n1 = 200
set @n2 = 500
set @factor = 80 --percent
set @d = '2000-01-01'
truncate table TC79
|
-
castling Commented 1 Years ago through Puzzles
@Adam Tokarski
Rule 2. For any patient there will be no overlapping date intervals.
--overlapping intervals
select * from TC79 t1 inner join TC79 t2
on t1.PatientID = t2.PatientID
and ((t1.AdmissionDate > t2.AdmissionDate and t1
|
-
castling Commented 1 Years ago through Puzzles
Thanks for scripts, but rule 2.
|
|
|
|
|
|
|