ORA-01790: expression must have same datatype as corresponding expression error message. Below is the sql I'm using. I cant really find whats causing the error please help.
select distinct *
from
( select
h.billingaddress,
h.sold_to,
'' as trx_number,
'' as bs_number,
apd.transaction_number
-- apd.transaction_number
from
amti_so_headers2 h
inner join
amti_print_document apd
on
h.header_id = apd.header_id
where
apd.transaction_number in ('9535','')
and
(
report_type = 'Billing Statement'
or
report_type = 'Sales Invoice'
)
UNION
select
billingaddress,
bill_to sold_to,
amti_trx_header.trx_number,
amti_trx_header.bs_number,
'' transaction_number
from
amti_trx_header
where
trx_number in ('','')
or
bs_number in ('9535','')
);
ORA-01790? - giorgiga