I have two query which is selecting some data from same table
query1 :
select rownum rn , error_data_log
from ext_tab_log
where error_data_log like'error%'
ORDER BY rn, error_data_log ;
Result :
+----+--------------------------+
| RN | error_data_log |
+----+--------------------------+
| 1 | error processing column |
+----+--------------------------+
query 2 :
select rownum rn , error_data_log
from ext_tab_log
where error_data_log like 'KUP-04101%'
ORDER BY rn, error_data_log ;
Result :
+----+----------------------------------------------+
| RN | error_data_log |
+----+----------------------------------------------+
| 1 | KUP-04101: record 1 rejected in file abc.txt |
| 2 | KUP-04101: record 8 rejected in file abc.txt |
| 3 | KUP-04101: record 9 rejected in file abc.txt |
+----+----------------------------------------------+
How can we write a sql query to obtain below result:
+----+----------------------------------------------+
| RN | error_data_log |
+----+----------------------------------------------+
| 1 | error processing column |
| 2 | KUP-04101: record 8 rejected in file abc.txt |
+----+----------------------------------------------+