Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-00936:Missing Expression when using distinct

660136Sep 23 2008 — edited Sep 23 2008
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
;
This post has been answered by NicloeiW on Sep 23 2008
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 21 2008
Added on Sep 23 2008
4 comments
4,311 views