SELECT
ca.Cand_id,
substr(SSnum,1,3) || '-' ||
substr(SSnum,4,2) || '-' ||
substr(SSNum,6,4) AS SSnum,
FName,
MI,
LName, rhd.title
FROM CANDIDATE ca,roster_history_detail rhd
where ca.cand_id = rhd.cand_id(+)
and lname like 'BERG%'
GROUP BY CA.CAND_ID,CA.SSNUM, CA.FNAME, CA.MI, CA.LNAME, rhd.title
ORDER BY CA.LNAME, CA.FNAME, CA.MI;
|