Hi,
I'm writing a piece of code that works fine until I place the
distinct function on the third line, and then I get the oracle error: ORA-00936: Missing Expression.
Does anyone understand where I'm going wrong?
select
customer_id,
*distinct* substr(old_system_id, instr(old_system_id, ':') +1, 4),
substr(old_system_id, 1, instr(old_system_id,':')-1),
old_system_id
from
ph1_ca_load
inner join
ph1_site_map_load
on
substr(old_system_id, 1, instr(old_system_id,':')-1) = site_code
inner join
customer
on
name = billing_customer
;