MS SQL
SELECT PATNT_REFNO, PATAL_REFNO
FROM TMP_PATSEARCH_FPATID
Oracle
DBMS_OUTPUT.PUT_LINE('PATNT_REFNO'
|| CHR(9) || 'PATAL_REFNO');
FOR c1 IN ( SELECT PATNT_REFNO, PATAL_REFNO
FROM TMP_PATSEARCH_FPATID )
LOOP
DBMS_OUTPUT.PUT_LINE( TO_CHAR(c1.PATNT_REFNO)
|| CHR(9) || TO_CHAR(c1.PATAL_REFNO) );
END LOOP;