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.
| Author |
Topic |
|
RajeS
Starting Member
2 Posts |
Posted - 2006-11-09 : 10:15:29
|
| Hi, I have two tables like Table A and Table B. Table A has column like Pat_no, Prescrip.No,PrescriptionDate,Exp.DateTable B has Column like Pat_no,Prescrip.No,RefillDate,Exp.dateMy question is If Table A and Table B has same Prescrip.No then I have to find Max(RefillDate) depends on Pat_no and prescrip.NO ( Prescrip.No may repeat in Table B)AndIf TableA has Prescrip.No and Table B does not have that Prescrip.No, I have find PrescriptionDate from Table A.Could you please let me know, How can I do this.ThanksRaje |
|
|
blindman
Master Smack Fu Yak Hacker
2365 Posts |
|
|
|
|
|