Bruce,
SET VAR vCount INTEGER= 0 SELECT COUNT(humptyID) INTO vCount FROM wall WHERE ColName CONTAINS 'humpty' IF vcount > 0 THEN SELECT humptyID INTO vHumptyID FROM wall where ColName CONTAINS 'humpty' AND COUNT = 1 ELSE -- No records found ENDIF Javier, Javier Valencia, PE O: 913-829-0888 H: 913-397-9605 C: 913-915-3137 From: [email protected] [mailto:[email protected]] On Behalf Of Bruce A. Chitiea Sent: Monday, July 01, 2013 1:07 PM To: RBASE-L Mailing List Subject: [RBASE-L] - Re: SELECT <First Row> Karen/Tony: Thanks much. That'll do just fine. I'm really just looking for the first physical row, whatever it is. I admit to making a questionable assumption that the string I'm looking forward is in that row; an assumption rendered less foolish by the "reliable" automated routine which created the Excel data being Gateway'd into this table. If the string ISN'T there, I've got OTher problems. Bruce From: [email protected] [mailto:[email protected]] On Behalf Of Karen Tellef Sent: Monday, July 01, 2013 10:57 AM To: RBASE-L Mailing List Subject: [RBASE-L] - Re: SELECT <First Row> If you really want the first physical row in a table use WHERE COUNT = 1 Karen -----Original Message----- From: Bruce A. Chitiea <[email protected]> To: RBASE-L Mailing List <[email protected]> Sent: Mon, Jul 1, 2013 12:45 pm Subject: [RBASE-L] - SELECT <First Row> All: RBGeX95(64) Current I want to hunt for certain strings within field 'humpty'. This works: DECLARE c1 SCROLL CURSOR FOR + SELECT humpty FROM wall OPEN c1 FETCH FIRST FROM c1 INTO vhumpty IND vind1 <Process> DROP CURSOR c1 Is there any direct means of SELECTing the FIRST row from table without having to resort to a cursor? Thanks Bruce Chitiea SafeSectors, Inc. eCondoMetrics 909.238.9012 cell

