Mike: Try:
select MAX (ColA) into vdata from table Jim -------------------------------------------- On Fri, 12/26/14, Michael J. Sinclair <[email protected]> wrote: Subject: [RBASE-L] - Selecting a row using count and order by DESC To: "RBASE-L Mailing List" <[email protected]> Date: Friday, December 26, 2014, 12:00 PM Hi All,I am trying to select values from a row based on count. It seems to work as expected when the order is ascending, but nothing changes when I make the order descending. ColA ColB-------------------abc 1def 2ghi 3 When I do this.... SELECT ColA into vdata i1 from table where count =1 order by ColB ASCthen I get the variablevdata = abc When I do this.... SELECT ColA into vdata from table where count =1 order by ColB DESC *(changed ASC to DESC)then I still get vdata = abc What I want is to get when the order is DESCvdata = ghi What am I doing wrong?Is what I want possible?Mike --- RBASE-L =======================3D=======================3 D= TO POST A MESSAGE TO ALL MEMBERS: Send a plain text email to [email protected] (Don't use any of these words as your Subject: INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH, REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP) =======================3D=======================3 D= TO SEE MESSAGE POSTING GUIDELINES: Send a plain text email to [email protected] In the message SUBJECT, put just one word: INTRO =======================3D=======================3 D= TO UNSUBSCRIBE: Send a plain text email to [email protected] In the message SUBJECT, put just one word: UNSUBSCRIBE =======================3D=======================3 D= TO SEARCH ARCHIVES: Send a plain text email to [email protected] In the message SUBJECT, put just one word: SEARCH-n (where n is the number of days). In the message body, place any text to search for. =======================3D=======================3 D=

