Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 dates again

Author  Topic 

kemi2299
Starting Member

41 Posts

Posted - 2008-06-25 : 10:16:42
hi guys,

however I am still getting duplicate records, its not choosing only the maximum date. Instead i am getting 2 dates for a patient record.


what i mean is that I want to choose the maximum date for a patient attendance in a month,
this statement below is still not choosing the maximum date only, its coming up with 2 dates for a patient attendance in a month.

max_Ep_St_Dt = DATEADD(day, DATEDIFF(day, 0, max(Ep_St_Dt)), 0)

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-06-25 : 10:22:13
If you still are haveing the same issue, don't start a new topic.
It will fragment your answers and both you and we will have trouble with finding information.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-06-25 : 10:24:12
Is this a continuation from this topic?
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=105501

Read and understand this blog post before posting next question.
http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspx


E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page
   

- Advertisement -