When I click on the column head, all the rows disappear This is a bug. Please report it to RDCC.
Is there any way to sort the columns now that I have the data I want? You’ll need to add an ORDER BY clause for the time being. Regards, Stephen Markson The Pharmacy Examining Board of Canada 416.979.2431 x251 From: [email protected] [mailto:[email protected]] On Behalf Of Michael J. Sinclair Sent: October-14-15 2:01 PM To: Stephen Markson Subject: [RBASE-L] - RE: extracting the most recent data Ah ha! You rock!! Is there any way to sort the columns now that I have the data I want? When I click on the column head, all the rows disappear Mike ________________________________ From: Stephen Markson <[email protected]<mailto:[email protected]>> To: [email protected]<mailto:[email protected]> Sent: Wednesday, October 14, 2015 1:56 PM Subject: [RBASE-L] - RE: extracting the most recent data Get rid of rdate_ in the GROUP BY Regards, Stephen Markson The Pharmacy Examining Board of Canada 416.979.2431 x251 From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Michael J. Sinclair Sent: October-14-15 1:43 PM To: Stephen Markson Subject: [RBASE-L] - RE: extracting the most recent data Hi Buddy, here is what i tried bro (max(rdate_)) patnumbr cptcode service from todo0 group by rdate_ patnumbr cptcode service instead of giving me just the last test, it gives me every test, as if it is ignoring the MAX function What am I doing wrong? Mike ________________________________ From: Buddy Walker <[email protected]<mailto:[email protected]>> To: [email protected]<mailto:[email protected]> Sent: Monday, October 12, 2015 8:54 PM Subject: [RBASE-L] - RE: extracting the most recent data Mike You could try SELECT MAX(datecolumn), patientnumber,testcode from sometable group by patientnumber, testcode, datecolumn Buddy From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Michael J. Sinclair Sent: Monday, October 12, 2015 8:23 PM To: [email protected]<mailto:[email protected]> Subject: [RBASE-L] - extracting the most recent data Hi all I have a very long skinny table, 3 columns. A date, a patient number and test code. I want to extract the rows that are the most recent test code for each patient. If patient #3000 has had testcode # 80015 10 times over the last year, then I only want the most recent row for that testcode/patient combination Is there a single command that can do that? Mike

