0

I'm trying to use the Oracle MERGE command and am getting an error saying ORA-00905: missing keyword

The query I'm trying is as follows

MERGE INTO vor_extract v USING
(SELECT dealer, wip_no, 
        required_date, required_time 
FROM vor_extract_temp
) t 
ON (v.dealer = t.dealer AND v.wip_no = t.wip_no)
WHEN MATCHED THEN
  UPDATE
  SET v.required_date = t.required_date,
    v.required_time   = t.required_time;

any clues anyone?

It's probably something simple as I've not used the MERGE statement before so am no doubt just missing something

Thanks all

2
  • what version of oracle are you using? Commented Apr 28, 2014 at 10:57
  • you can see my answer below Commented Apr 28, 2014 at 11:02

1 Answer 1

3

Generally, the syntax seems valid. But in case you are using oracle versions earlier than 10g, the

 WHEN NOT MATCHED ...

clause is also mandatory

Sign up to request clarification or add additional context in comments.

1 Comment

ah, that will be it then. Yes I am on an old Oracle 9 DB. Thanks a lot for that. I know it would be something simple...

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.