union all and order by together
Hi
Im trying to use union all and order by in below sql query .Do help out
select vendor_id
|| '|'|| set_of_books_id
||'|'|| TO_CHAR (last_update_date, 'DY MON DD HH24:MI:SS YYYY')
from ap_invoices_all
where vendor_id like '%1234%'
union all
select vendor_id
|| '|'|| set_of_books_id
||'|'|| TO_CHAR (last_update_date, 'DY MON DD HH24:MI:SS YYYY')
from ap_invoices_all
where vendor_id like '%134%'
order by last_update_date;
Im getting ORA-00904: "LAST_UPDATE_DATE": invalid identifier