I'm not sure I understand, but you could try the rrn function. Maybe that's what you want.
select rrn(custmas), cusno, cusnm from custmas order by cusnm desc
On Sunday, November 22, 1998, 10:35 PM, Kannan wrote: How do I can get serial number column in the SELECT clause? For example in the SELECT * FROM EMPLOYEEDB will return all the records from the file EMPLOYEEDB.In the above statment I want an additional column which will give the serial number for the selected statments. Some other SQL products is having NUMBER(*) function ,this function is giving the serial number for the selected records.But how do I get the result in STRSQL on AS/400.