![]() |
|
|
|||||||
![]() |
DotNet - Showing last collected record in gridview |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
I have 2 SQL server tables
1. Bloodtest containing a list for valid bloodtests (bloodtestNumber) and descriptions (BloodWorkx) 2 PatientBloodtest containing the results captured for a specific patient (PatientBloodWorx) Users capture blood test results at different times and they do not always capture all the bloodtests. ALL I want to do is to display the last blood test results captured for the patient in a gridview using this query SELECT BloodWorx.BldTestName, PatientBloodWorx.membershipNumber, PatientBloodWorx.BeneficiaryCode, MAX(PatientBloodWorx.BloodTestDate) AS LastOfbloodtestdate, MAX(PatientBloodWorx.BloodTestReceiveDate) AS LastOfBLOoDTESTRECEIVEDATE, MAX(PatientBloodWorx.BloodResult) AS LastOfBloodresult FROM BloodWorx LEFT JOIN PatientBloodWorx ON BloodWorx.BldNumber = PatientBloodWorx.BloodTest GROUP BY BloodWorx.BldTestName, PatientBloodWorx.membershipNumber, PatientBloodWorx.BeneficiaryCode, BloodWorx.BldNumber HAVING (PatientBloodWorx.membershipNumber = @membershipNumber) AND (PatientBloodWorx.BeneficiaryCode = @BeneficiaryCode) Can someone help? DotBlonde |
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Gridview row information disappearing after selectedIndexChanged | Ry99 | General Help Related Topics | 0 | 07-13-2009 03:35 PM |
| How to focus the top of the gridview | sureshk | Software | 0 | 05-30-2008 09:40 PM |
| Checkbox values problem in gridview | thanigaimani.thirumalai | Software | 0 | 11-09-2007 05:12 AM |
| First Optical Disc Recorder Able to Record and Playback Blu-Ray, DVD & CD Formats. (NEWS) | Allan | DVD Video | 0 | 02-15-2005 01:06 PM |
| BREAKING: Kerry leading in key states, PA, FL, OH, WI, MI .... | Official Election Guide 2004 | DVD Video | 89 | 11-08-2004 03:40 PM |