SELECT iif(!empty(localdesc),localdesc,DESCRIPTIO),PADR(dcode,15) AS dcode1 ; FROM (gcProcDBF) ; where screenoption=[RADIOLOGY] ; UNION ALL ; SELECT procalias, PADR(dcode,15) AS dcode1 ; FROM (gcPAlias) ; WHERE dcode IN ( SELECT dcode FROM (gcProcDBF) ; where screenoption=[RADIOLOGY] ); ORDER BY 1 ; INTO ARRAY RADPROCS>I have a table called proc.dbf and child table called palias.dbf
>gcProcDBF=[..\proc.dbf] >gcPalias=[..\palias] >SELECT iif(!empty(localdesc),localdesc,DESCRIPTIO),PADR(dcode,15) AS dcode1 ; > FROM &gcProcDBF ; > where screenoption=[RADIOLOGY] ; > UNION ALL ; > SELECT procalias, PADR(dcode,15) AS dcode1 ; > FROM &gcPAlias ; > ORDER BY 1 ; > INTO ARRAY RADPROCS >