techytechy
MIS
Hi guys,
I am Using sql server 2005 and I need to find the values at every 15th date in each group of a table. Below is the Table "Orders". I am grouping on PatientID
PatientID, AdmitDate, treatment
-------------------------------
1, Date1, Treatment1
1, Date2, Treatment2
....
....
1, Date15, Treatment15
1, Date16, Treatment16
...
2, Date19, Treatment19
2, Date1, Treatment1
....
2, Date15, Treatment15
2, Date3, Treatment3
...
-------------------------------
please note that the date column is not always ascending, its ordered randomly like in patientID = 2 in the above.
Thanks
I am Using sql server 2005 and I need to find the values at every 15th date in each group of a table. Below is the Table "Orders". I am grouping on PatientID
PatientID, AdmitDate, treatment
-------------------------------
1, Date1, Treatment1
1, Date2, Treatment2
....
....
1, Date15, Treatment15
1, Date16, Treatment16
...
2, Date19, Treatment19
2, Date1, Treatment1
....
2, Date15, Treatment15
2, Date3, Treatment3
...
-------------------------------
please note that the date column is not always ascending, its ordered randomly like in patientID = 2 in the above.
Thanks