Hi,
I am trying to do union all on dual and select statement with order by ERP column.
select 'PD','ERP' ERP,'ACCOUNT','RECORD','AMT' from dual
UNION ALL
select MONTH,ERP,ACCOUNT,RECORD,AMOUNT from AC_BK_TAB
ORDER BY ERP
This gives result in Asc order by ERP. But I have ERPs starting from character 'Bxxx' and hence header record which has 'ERP' is coming in the middle of the record set.
Can I have order by on ERP on the second query itself having header as first record.
Thanks in advance