Viewing 4 posts - 1 through 4 (of 4 total)
Hi Jason,
Your solution looks solid but the query wouldn't execute past:
"MAX(adg.AdminDateGroup) OVER (PARTITION BY adg.PatientID ORDER BY adg.AdmissionDate) AS AdminDateGroup".
error - Incorrect syntax near 'order'.
Tried going around...
July 2, 2015 at 9:35 am
Amazing. Works perfectly. Thank you:-):-):-)
July 2, 2015 at 9:26 am
Hi Jason,
I'm using version 2008. Did not really pay attention to it, and it doesn't come with LAG and LEAD functions. I've just re-posted this on the 2008 forum....
June 29, 2015 at 3:39 pm
Perfect. Thanks for your help, this will solve the problem, will tryout and give you a feedback. I like how you used the LAG function and partition - Brilliant. :w00t:
June 28, 2015 at 11:48 pm
Viewing 4 posts - 1 through 4 (of 4 total)