Viewing 15 posts - 1 through 15 (of 17 total)
January 31, 2017 at 7:42 am
January 31, 2017 at 6:53 am
That works, thanks!:-)
March 14, 2016 at 8:44 am
"or you need to convert the column to a date without time (no index seeks possible)." - how do I do that?
March 14, 2016 at 8:34 am
ScheduledActivity.ScheduledStartTime = CONVERT(datetime, '14/03/2016',110) gives me no values returned and that same out of range error
March 14, 2016 at 8:23 am
That does work, thanks. But it means I cannot use it the way I need to. It would be fine is I was running the sql manually but...
March 14, 2016 at 8:21 am
I don't want to use a declare function as I am using the sql query to feed a report where the report parameter is a single date entered by the...
March 14, 2016 at 8:08 am
Thanks, but using that returns no records, and I know that it should return something. I have written in the WHERE:
ScheduledActivity.ScheduledStartTime = CONVERT(datetime, '14/03/2016',103)
The datetime field in the output...
March 14, 2016 at 8:04 am
Sorry, its Adaptive server enterprise version 15
Am I on the wrong forum? Can you point me in the right direction?
Thanks
February 17, 2014 at 9:39 am
Transact SQL? Im using a package that comes with our system but can also use SQL advantage of that makes any difference.
February 17, 2014 at 8:25 am
; WITH cte (Patient.PatientId,Course.CourseId,Course.StartDateTime,RowNumber) AS (
SELECT Patient.PatientId,Course.CourseId,Course.StartDateTime
,ROW_NUMBER() OVER (PARTITION BY Patient.PatientId,YEAR(Course.StartDateTime),MONTH(Course.StartDateTime ORDER BY YEAR(Course.StartDateTime),MONTH(Course.StartDateTime
))
FROM
Patient,
Course
WHERE
Patient.PatientSer = Course.PatientSer
)
SELECT Patient.PatientId,Course.CourseId,Course.StartDateTime,SIGN(RowNumber)-SIGN(RowNumber-1) AS [CountUnique]
FROM cte ;
I get the error...
February 17, 2014 at 8:09 am
Incorrect syntax near keyword 'with'
February 17, 2014 at 4:51 am
Incorrect syntax near keyword 'with'
February 17, 2014 at 4:50 am
Hi, thanks for the reply. Is there a bit missing at the start?
I get an error when starting with
; WITH ...
?
Thanks
February 17, 2014 at 3:04 am
Viewing 15 posts - 1 through 15 (of 17 total)