select item, recno() as rcn from table1; where subs(item,4)='1442' into cursor t1 scan select table1 go t1.rcn * do something here endscanBe warned that the use of recno() (as goes for any other function which takes an alias for a parameters) is warranted only because we are having a single table in the select. With more than one table, it wouldn't work as is - then we'd have to split that into a select from a single table into a cursor, and then from that cursor with other tables into the final cursor.