プロが教えるわが家の防犯対策術!

merge into contact A
using contact_vw B
on (A.postID = B.postID)
when matched then update set A.postID = B.postID
when not matched then insert values (B.postID, B.postID)

行1でエラーが発生しました。:
ORA-00947: 値の個数が不足しています


merge intoについて詳しく書いてあるサイト探しています。
よろしくお願いします。

A 回答 (1件)

最後の行の


insert values (B.postID, B.postID)
の部分の値の個数が少ないのでしょう。

このvalues(...)の中に、Bテーブルの項目をすべて列挙する必要があります。

これは普通のinsert命令と同じです。
    • good
    • 0
この回答へのお礼

ありがとうございます。
試してみます。

お礼日時:2005/10/27 20:49

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!