vivek.verma111
Starting Member
6 Posts |
Posted - 2010-09-09 : 10:18:11
|
I have 3 sql tablesPatients:PatientID(varchar), PatientName(varchar), BPM_ID(varchar),WM_ID(varchar)values:2020211, XXXYYY, Philips001, ANDINS0012002012, YDHHHH, Philips002, ANDINS002BPMReadings:BPM_ID(varchar), TimeStmp (datetime), BP(int)Values:Philips001, 09/09/2010 10:15:11, 150Philips001, 09/09/2010 11:11:01, 152Philips001, 08/09/2010 11:12:22, 148Philips001, 07/09/2010 18:12:22, 147Philips002, 09/08/2010 10:10:11, 130etc etcWMReadings:WM_ID(varchar), WTimeStmp (datetime), Weight(float)Values:ANDINS001, 09/09/2010 09:15:11, 98 ANDINS001, 08/09/2010 10:15:11, 98.2ANDINS001, 05/09/2010 17:14:11, 98.8ANDINS002, 09/09/2010 12:15:11, 85ANDINS002, 08/09/2010 18:15:11, 85.4Need result likequery parameter is @PatientIDif @PatientID='2020211'Query result:Date Time BP Time Weight09/09/2010 10:15:11 150 09:15:11 9809/09/2010 11:11:01 152 Null Null08/09/2010 11:12:22 148 10:15:11 98.207/09/2010 18:12:22 147 Null Null05/09/2010 Null Null 17:14:11 98.8 Is it possible by any sql query |
|