m.lcSQLSortCol = "lastname" SELECT PatientID, lastname, firstname FROM Patients INTO CURSOR csrResult ; ORDER BY (m.lcSQLSortCol)