You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register
Get Started: AI Resources for Oracle Cloud HCM – Go Here

Progress with Redwood: Redwood Resources for Oracle Cloud HCM -  Go Here

SQL with statement window function error

Hello! I am trying to run a window function to rank the rows in order to remove any duplicates (code below). I am getting the error "ORA-00923: FROM keyword not found where expected". Also WITH is not highlighting as a keyword so I am wondering if something is causing the error there. Can anyone help with this?

WITH names as (

SELECT

    DISTINCT(e.person_id) as  ID,
    papf.person_number,
    e.first_name as first1, 
    e.last_name as last1 , 
    to_char(e.LAST_UPDATE_DATE, 'yyyy/mm/dd') as updatedate1,
    to_char(e.effective_start_date, 'yyyy/mm/dd') as startdate1 , 
    to_char(e.effective_end_date, 'yyyy/mm/dd') as enddate1 , 
    l.first_name as first2, 
    l.last_name as last2, 
    to_char(l.LAST_UPDATE_DATE, 'yyyy/mm/dd') as updatedate2,
    to_char(l.effective_start_date, 'yyyy/mm/dd') as startdate2 ,
    to_char(l.effective_end_date, 'yyyy/mm/dd') as enddate2
    

FROM per_person_names_f e

JOIN per_person_names_f l ON e.person_id = l.person_id
LEFT
Tagged:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!