
August 8th, 2004, 10:45 PM
|
|
Contributing User
|
|
Join Date: May 2004
Location: Dallas, TX
Posts: 65
Time spent in forums: 8 h 28 m 15 sec
Reputation Power: 5
|
|
|
SQL to select a subquery into an array for the original query?
I have a dataset that looks something like this...
Patient ID First Name Last Name Test Date Test Type
1 562 REV B CD21BR12 2001-04-26 CP
1 562 REV B CD21BR12 2001-04-26 FA
2 TEST TESTER 2001-04-26 CP
2 TEST TESTER 2001-04-26 FA
2 TEST TESTER 2001-05-09 FA
3 562 REV B CD21BR12 2001-04-30 CP
3 562 REV B CD21BR12 2001-04-30 FA
4 TEST WHALE 2001-05-09 CP
4 TEST WHALE 2001-05-09 FA
9000 RUBY CHANDLER 2004-02-10 CP
9000 RUBY CHANDLER 2004-06-29 CP
9000 RUBY CHANDLER 2004-06-29 FA
As you can see it returns multiple entries for the same paitent id which is half correct. what i want it to do is for each patient, make an arry of the test types if the tests were on the same date. Is this possible?
|