January 17, 2011 at 6:44 am
ECDNoDischDt
1000756532010-12-31
1000670862010-12-16
1000678382010-12-11
1000734292010-12-28
1000036742010-07-28
1000598602010-11-21
1000623102010-12-02
1000640072010-12-04
1000531002010-11-12
1000633192010-12-01
table
ADTInfo
ECDNoProcDt
127402392010-07-15
127402392010-07-15
127402392010-07-15
127402392010-07-14
127402392010-07-17
DiagnosisandProc
I will like to check the ProDate in DiagnosisandProc is within the min day and max day of the dischDate in ADTInfo
table.
January 17, 2011 at 9:30 am
What is your expected output and what have you tried so far?
January 17, 2011 at 10:15 am
I expect out come will be DiagnosisandProc has record come out if the date in the range. If not, I will have error message for the end user as no records in the range.
January 17, 2011 at 10:52 pm
Frances L (1/17/2011)
I will like to check the ProDate in DiagnosisandProc is within the min day and max day of the dischDate in ADTInfo table.
Have you checked out the MIN and MAX functions?
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
January 18, 2011 at 5:02 am
Min and max function is working fine. I have problem to write in sql. thx.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply