0

I am executing the below query in oracle but I am getting an error on the execution of the below query , Please advise how to overcome from this specially the error come when i add the last clause of where condition in the query

SELECT  t.product_name FROM JOBCODE_PROJECT_TYPE_MAPPING p
INNER JOIN AOBCODE_UCT_MAPPING h 
ON p.ID = h.jobcode_id
INNER JOIN WISK_UCTS t
ON h.risk_product_id = t.risk_product_id AND p.id = h.jobcode_id;
where p.sp_job_code= 'Add';
1
  • Usually, the error comes with an error message that may provide additional clues... Commented Jun 12, 2018 at 6:33

1 Answer 1

2

Remove second duplicate condition AND p.id = h.jobcode_id; which is irrelevant in the join context:

  SELECT  t.product_name FROM JOBCODE_PROJECT_TYPE_MAPPING p
 INNER JOIN AOBCODE_UCT_MAPPING h 
 ON p.ID = h.jobcode_id
 INNER JOIN WISK_UCTS t
 ON h.risk_product_id = t.risk_product_id 
 where p.sp_job_code= 'Add';
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.