2017-02-10 19 views
0

こんにちは私は、MERGEのDB2ドキュメント(https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_71/sqlp/rbafymerge.htm)に従っており、以下のステートメントを思い付いています。しかし、これは以下のエラーで失敗しているSQLマージが動作しません

MERGE INTO TEMP2 target USING TEMP1 source 
    ON target.ITNBR = source.ITNBR   
      AND target.STID = source.STID  
      AND target.ITRV = source.ITRV  
WHEN NOT MATCHED THEN      
    INSERT VALUES(TEMP1.*)     
WHEN MATCHED THEN       
    UPDATE SET ITNBR = source.ITNBR 

キーワードSOURCEは期待できません。有効なトークン:フルレフトクロスインナーRIG

ここで何が間違っているのか分かりません。誰かが助けてくれますか?

答えて

2

これは、SOURCEがDB2キーワードであるためです。私はそれを別の言葉に変えて、宝石のように働く。なぜIBMはその公式文書にそのような例を挙げるのだろうか?

+0

多分あなたはそれが固定取得するIBMとドキュメンテーションPMRを開く必要があります。 – jmarkmurphy

+0

はいマーク!どのようにこれを行うには分からないが、間違いなく見つけて行います。ホープ誰もこれに行かず、コードを完成させようと狂ったときに時間を無駄にします:P –

+0

@ user3311539リンク先ページの下部に「フィードバック」リンクがあり、下部に「連絡先」リンクが表示されます。それ以外の場合は、IBMサポートに電話またはEメールを送信してください。 – user2338816

0

だから、IBMは、これが問題である確認している、将来のリリースで修正することに合意しました:

From: Nathan R Skalsky [mailto:[email protected]] 
Sent: Tuesday, February 14, 2017 4:34 AM 
To: Thejwal Pavithran <[email protected]> 
Subject: RE: Feedback to IBM Knowledge Center - Content page/ssw_ibm_i_71/IBM i 7.1 

Hi Thejwal, 

Unfortunately, this is not our normal channel of communication; Therefore, I will not be posting to the specified thread. 
Your welcome to communicate it. 

Thanks, 

Nathan R. Skalsky 
IBM i Software Engineer - DB2 for IBM i Development 
________________________________________ 

E-mail: [email protected] 
Internal: Nathan R Skalsky/Rochester/IBM 


3605 Hwy 52 N 
Rochester, MN 55901-1407 
United States 





From:  Thejwal Pavithran <[email protected]> 
To:  Nathan R Skalsky/Rochester/[email protected] 
Date:  02/13/2017 11:53 AM 
Subject:  RE: Feedback to IBM Knowledge Center - Content page/ssw_ibm_i_71/IBM i 7.1 
________________________________________ 



Thanks Nathan! 

Would be great if you could post a reply on the Stack Overflow thread for the sake of all users. 

Thanks, 
Thejwal 


     Thejwal Pavithran | IBMi Developer 
     7th Floor, ‘Electra’, Wing A, Prestige Tech Park, Marathalli| Bangalore – 560103 | Karnataka 
     Direct line: | Cell: +91 9620661497 
     [email protected]| www.polaris.com 

From: Nathan R Skalsky [mailto:[email protected]] 
Sent: Monday, February 13, 2017 11:21 PM 
To: Thejwal Pavithran <[email protected]> 
Subject: Feedback to IBM Knowledge Center - Content page/ssw_ibm_i_71/IBM i 7.1 

Hi Theywal, 

Thank you for your bringing this to my attention. We will fix this in a future technical refresh (TR) of the SQL Programming topic in 7.2 and 7.3. 
The fix will remove the word SOURCE from these examples. 

Thanks, 

Nathan R. Skalsky 
IBM i Software Engineer - DB2 for IBM i Development 
________________________________________ 

E-mail: [email protected] 
Internal: Nathan R Skalsky/Rochester/IBM 


3605 Hwy 52 N 
Rochester, MN 55901-1407 
United States 




Thejwal Pavithran ---02/12/2017 03:08:33 AM---Hi Team, Have come across a minor issue in DB2 MERGE syntax at below page. 

From: Thejwal Pavithran <[email protected]> 
To: IBM Knowledge Center/Pittsburgh/[email protected] 
Date: 02/12/2017 03:08 AM 
Subject: Feedback to IBM Knowledge Center - Content page/ssw_ibm_i_71/IBM i 7.1 
________________________________________ 




Hi Team, 
Have come across a minor issue in DB2 MERGE syntax at below page. 
URL: https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_71/sqlp/rbafymerge.htm 
Issue described here: 
http://stackoverflow.com/questions/42151989/sql-merge-not-working/42152283?noredirect=1#comment71511658_42152283 
Please attempt to rectify. 
Thanks, 
Thejwal 


    Thejwal Pavithran | IBMi Developer 
     7th Floor, ‘Electra’, Wing A, Prestige Tech Park, Marathalli| Bangalore – 560103 | Karnataka 
     Direct line: | Cell: +91 9620661497 
     [email protected]| www.polaris.com 


Thanks, 

Nathan R. Skalsky 
IBM i Software Engineer - DB2 for IBM i Development 
________________________________________ 

Phone:(507) 253-1685 
T/L: (507) 553-1685 
Fax: (507) 253-4728 
Office: 15-3 C118 
E-mail: [email protected] 
Internal: Nathan R Skalsky/Rochester/IBM 


3605 Hwy 52 N 
Rochester, MN 55901-1407 
United States 

CONFIDENTIAL: The information contained in this email communication is confidential information intended only for the use of the addressee. Unauthorized use, disclosure or copying of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please notify us immediately by return email and destroy all copies of this communication, including all attachments. 
関連する問題