Db2 SQL合并不工作
您好,我遵循了有关MERGE的DB2文档()并提出了以下语句Db2 SQL合并不工作,db2,ibm-midrange,Db2,Ibm Midrange,您好,我遵循了有关MERGE的DB2文档()并提出了以下语句 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
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是一个DB2关键字。我把它换成另一个词,像宝石一样工作。为什么IBM会在他们的官方文档中给出这样一个例子呢?所以问题是因为SOURCE是一个DB2关键字。我把它换成另一个词,像宝石一样工作。为什么IBM会在其官方文档中给出这样一个例子?因此IBM已确认这是一个问题,并同意在未来的版本中予以纠正:
From: Nathan R Skalsky [mailto:skalsky@us.ibm.com]
Sent: Tuesday, February 14, 2017 4:34 AM
To: Thejwal Pavithran <Thejwal.Pavithran@polaris.com>
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: skalsky@us.ibm.com
Internal: Nathan R Skalsky/Rochester/IBM
3605 Hwy 52 N
Rochester, MN 55901-1407
United States
From: Thejwal Pavithran <Thejwal.Pavithran@polaris.com>
To: Nathan R Skalsky/Rochester/IBM@IBMUS
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
thejwal.pavithran@Polaris.com| www.polaris.com
From: Nathan R Skalsky [mailto:skalsky@us.ibm.com]
Sent: Monday, February 13, 2017 11:21 PM
To: Thejwal Pavithran <Thejwal.Pavithran@polaris.com>
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: skalsky@us.ibm.com
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 <Thejwal.Pavithran@polaris.com>
To: IBM Knowledge Center/Pittsburgh/IBM@IBMUS
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
thejwal.pavithran@Polaris.com| 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: skalsky@us.ibm.com
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.
发件人:Nathan R Skalsky[mailto:skalsky@us.ibm.com]
发送日期:2017年2月14日星期二上午4:34
致:Thejwal Pavithran
主题:RE:对IBM知识中心的反馈-内容页/ssw_IBM_i_71/IBM i 7.1
嗨,他们好,
不幸的是,这不是我们正常的沟通渠道;因此,我不会发布到指定的线程。
欢迎您来交流。
谢谢
内森·R·斯卡尔斯基
IBM i软件工程师-用于IBM i开发的DB2
________________________________________
电邮:skalsky@us.ibm.com
内部:Nathan R Skalsky/Rochester/IBM
北纬52号公路3605号
明尼苏达州罗切斯特55901-1407
美国
发件人:Thejwal Pavithran
收件人:Nathan R Skalsky/罗切斯特/IBM@IBMUS
日期:2017年2月13日上午11:53
主题:RE:对IBM知识中心的反馈-内容页/ssw_IBM_i_71/IBM i 7.1
________________________________________
谢谢你,内森!
为了所有用户的利益,如果您可以在堆栈溢出线程上发布回复,那就太好了。
谢谢
蒂杰瓦尔
JWAL Pavithran | IBMi开发商
卡纳塔克邦马拉塔利(班加罗尔)威望科技园A座“Electra”7楼-卡纳塔克邦560103
直接线路:|单元:+91 9620661497
thejwal。pavithran@Polaris.com|www.polaris.com
发件人:Nathan R Skalsky[邮寄地址:skalsky@us.ibm.com]
发送日期:2017年2月13日星期一晚上11:21
致:Thejwal Pavithran
主题:对IBM知识中心的反馈-内容页/ssw_IBM_i_71/IBM i 7.1
他们好,
谢谢你让我注意到这一点。我们将在7.2和7.3中SQL编程主题的未来技术更新(TR)中修复此问题。
修复程序将从这些示例中删除单词SOURCE。
谢谢
内森·R·斯卡尔斯基
IBM i软件工程师-用于IBM i开发的DB2
________________________________________
电邮:skalsky@us.ibm.com
内部:Nathan R Skalsky/Rochester/IBM
北纬52号公路3605号
明尼苏达州罗切斯特55901-1407
美国
jwal-Pavithran---2017年12月2日03:08:33上午---Hi团队在下页遇到了DB2合并语法中的一个小问题。
发件人:Thejwal Pavithran
收件人:IBM知识中心/匹兹堡/IBM@IBMUS
日期:2017年12月2日03:08上午
主题:对IBM知识中心的反馈-内容页/ssw_IBM_i_71/IBM i 7.1
________________________________________
嗨,团队,
在下页的DB2合并语法中遇到了一个小问题。
网址:https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_71/sqlp/rbafymerge.htm
此处描述的问题:
http://stackoverflow.com/questions/42151989/sql-merge-not-working/42152283?noredirect=1#comment71511658_42152283
请尝试纠正。
谢谢
蒂杰瓦尔
JWAL Pavithran | IBMi开发商
卡纳塔克邦马拉塔利(班加罗尔)威望科技园A座“Electra”7楼-卡纳塔克邦560103
直接线路:|单元:+91 9620661497
thejwal。pavithran@Polaris.com|www.polaris.com
谢谢
内森·R·斯卡尔斯基
IBM i软件工程师-用于IBM i开发的DB2
________________________________________
电话:(507)253-1685
电汇:(507)553-1685
传真:(507)253-4728
办公室:15-3 C118
电邮:skalsky@us.ibm.com
内部:Nathan R Skalsky/Rochester/IBM
北纬52号公路3605号
明尼苏达州罗切斯特55901-1407
美国
机密:此电子邮件通信中包含的信息是仅供收件人使用的机密信息。严禁未经授权使用、披露或复制本通讯,可能是非法的。如果您错误地收到本通讯,请立即通过回复电子邮件通知我们,并销毁本通讯的所有副本,包括所有附件。
因此,IBM已确认这是一个问题,并同意在未来版本中予以纠正:
From: Nathan R Skalsky [mailto:skalsky@us.ibm.com]
Sent: Tuesday, February 14, 2017 4:34 AM
To: Thejwal Pavithran <Thejwal.Pavithran@polaris.com>
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: skalsky@us.ibm.com
Internal: Nathan R Skalsky/Rochester/IBM
3605 Hwy 52 N
Rochester, MN 55901-1407
United States
From: Thejwal Pavithran <Thejwal.Pavithran@polaris.com>
To: Nathan R Skalsky/Rochester/IBM@IBMUS
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
thejwal.pavithran@Polaris.com| www.polaris.com
From: Nathan R Skalsky [mailto:skalsky@us.ibm.com]
Sent: Monday, February 13, 2017 11:21 PM
To: Thejwal Pavithran <Thejwal.Pavithran@polaris.com>
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: skalsky@us.ibm.com
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 <Thejwal.Pavithran@polaris.com>
To: IBM Knowledge Center/Pittsburgh/IBM@IBMUS
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
thejwal.pavithran@Polaris.com| 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: skalsky@us.ibm.com
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.
发件人:Nathan R Skalsky[mailto:skalsky@us.ibm.com]
发送日期:2017年2月14日星期二上午4:34
致:Thejwal Pavithran
主题:RE:对IBM知识中心的反馈-内容页/ssw_IBM_i_71/IBM i 7.1
嗨,他们好,
不幸的是,这不是我们正常的沟通渠道;因此,我不会发布到指定的线程。
欢迎您来交流。
谢谢
内森·R·斯卡尔斯基
IBM i软件工程师-用于IBM i开发的DB2
________________________________________
电邮:skalsky@us.ibm.com
内部:Nathan R Skalsky/Rochester/IBM
北纬52号公路3605号
明尼苏达州罗切斯特55901-1407
美国
发件人:Thejwal Pavithran
收件人:Nathan R Skalsky/罗切斯特/IBM@IBMUS
日期:2017年2月13日上午11:53
主题:RE:对IBM知识中心的反馈-内容页/ssw_IBM_i_71/IBM i 7.1
________________________________________
谢谢你,内森!
为了所有用户的利益,如果您可以在堆栈溢出线程上发布回复,那就太好了。
谢谢
蒂杰瓦尔
JWAL Pavithran | IBMi开发商
卡纳塔克邦马拉塔利(班加罗尔)威望科技园A座“Electra”7楼-卡纳塔克邦560103
直接线路:|单元:+91 9620661497
thejwal。pavithran@Polaris.com|www.polaris.com
发件人:Nathan R Skalsky[邮寄地址:skalsky@us.ibm.com]
发送日期:2017年2月13日星期一晚上11:21
致:Thejwal Pavithran
主题:对IBM知识中心的反馈-内容页/ssw_IBM_i_71/IBM i 7.1
他们好,
谢谢你让我注意到这一点。我们将在7.2和7.2中SQL编程主题的未来技术更新(TR)中修复此问题