>select distinct last_name, first_name, mid_name, ; > address1, address2, city, state, zip_code, ; > ' ' as packet_id,ssn, right(a.ssn,4) as ssno ; > from temp ; > into cursor address ; > order by ssno, ssn >>How to fix in vfp9 besides making two statements?
select distinct last_name, first_name, mid_name, ; address1, address2, city, state, zip_code, ; ' ' as packet_id,ssn, right(a.ssn,4) as ssno ; from temp ; into cursor address ; order by 11, 10The ORDER BY fields have to exist in your table to reference them by name and ssno doesn't.