I am trying to get rid of duplicate job roles before the data is entered into my actual dimensions table, everytime I run my script I keep getting a missing expression error and im not sure why, any help would be mostly appreciated.
INSERT INTO job_role_dim (
SELECT job_role_id.nextval, DISTINCT job_role_desc
FROM temp_job_role_dim);
DISTINCTkeyword suggests that you have a different expectation for its effect than the effect it actually has.DISTINCTdoes not qualify individual columns; rather it qualifies the overallSELECTclause, instructing that no duplicate rows be returned.