在ORACLE 11.2.0.3上执行merge into 里面sql 入下形式:
merge into DCDW.t1 Target
using (select Org_code Org_code,
BUSS_DATE,
BUSS_NO,
...
from (SELECT E.BUSS_NO BUSS_NO,
E.Org_code Org_code,
..
FROM DCDW.T E
WHERE
E.MODIFIED_DATE >= IN_BEGIN_DATE
AND E.MODIFIED_DATE <= IN_END_DATE)
group by BUSS_NO,Org_code,BUSS_DATE) Source
ON (Target.ORG_CODE = Source.Org_code and target.BUSS_TYPE = '1' AND target.BUSS_DATE = source.BUSS_DATE AND target.BUSS_NO = source.BUSS_NO)
WHEN NOT MATCHED THEN
INSERT
..
WHEN MATCHED THEN
UPDATE
SET ..;
咋都会错误,在ORACLE 11.2.0.1上执行正常,修改以下sql,在各个版本执行都正常,唯一区别是max(org_code)
erge into DCDW.t1 Target
using (select max(Org_code) Org_code,
BUSS_DATE,
BUSS_NO,
...
from (SELECT E.BUSS_NO BUSS_NO,
E.Org_code Org_code,
..
FROM DCDW.T E
WHERE
E.MODIFIED_DATE >= IN_BEGIN_DATE
AND E.MODIFIED_DATE <= IN_END_DATE)
group by BUSS_NO,BUSS_DATE) Source
ON (Target.ORG_CODE = Source.Org_code and target.BUSS_TYPE = '1' AND target.BUSS_DATE = source.BUSS_DATE AND target.BUSS_NO = source.BUSS_NO)
WHEN NOT MATCHED THEN
INSERT
..
WHEN MATCHED THEN
UPDATE
SET ..;
奇怪得很!make下!
相关推荐
3. **处理`DBLINK`问题**:在跨数据库链接使用`MERGE`时,需要注意Oracle 10g中一个已知的bug(Bug ID 4311273),该bug可能导致ORA-02064错误。解决方法是确保`WHEN MATCHED THEN`和`WHEN NOT MATCHED THEN`两个...
1. `MERGE INTO` 目标表 AS 目标别名 2. `USING` 源表 AS 源别名 3. `ON` 连接条件(确定目标表和源表的匹配规则) 4. `WHEN MATCHED THEN UPDATE SET` 更新已匹配的行 5. `WHEN NOT MATCHED BY TARGET THEN INSERT`...
Plugin: File - Maintenance - Merge database, for merging newer revisions from a specified .nyf database into the current database Enhancement: an option to display colorful labels; The color is ...
1. Unzip "Simple tags" archive and put all files into a folder like "/wp-content/plugins/simple-tags/" 2. Activate the plugin through the 'Plugins' menu in WordPress 3. Inside the Wordpress admin, go ...
* NK2Edit - Edit, merge and fix the AutoComplete files (.NK2) of Microsoft Outlook. Description =========== OutlookAttachView scans all messages stored in your Outlook, and displays the list of ...
Contents Overview 1 Lesson 1: Index Concepts 3 Lesson 2: Concepts – Statistics 29 Lesson 3: Concepts – Query Optimization 37 Lesson 4: Information Collection and Analysis 61 Lesson 5: Formulating ...
Committers fall into three groups: committers who are only concerned with one area of the project (for instance file systems), committers who are involved only with one sub-project and committers who ...
2. **Import into Repository**:将本地文件或目录导入到代码库。 3. **Update**:从代码库获取最新的更改并应用到本地工作副本。 - **Update**:常规更新。 - **Update More**:递归更新子目录。 - **Update ...
4. **DML语句**:如INSERT INTO,UPDATE,DELETE,以及MERGE语句用于数据的增删改操作。 5. **事务管理**:BEGIN,COMMIT,ROLLBACK语句用于控制数据库的事务,确保数据的一致性和完整性。 6. **游标**:在PL/SQL...
* - = bug fix * + = new feature * * = changed, expanded feature ******************************************* * IMPORTANT: Please edit file WPINC.INC to * activate WPREPORTER, WPSPELL, wPDF, TBX * and ...
git commit -m 'Merge refactor into dev12-18' ``` **说明:** - 在这里使用了一个合并提交,通常在解决完冲突之后,你需要重新提交来确认合并结果。 以上是Git的一些常用命令及其使用方法,通过掌握这些基本操作...
* PKCS#11 - Number of virtual slots moved into configuration. * PKCS#11 - Fix fork() compliance. * make sign_with_decrypt hack configureable for siemens cards. New in 0.11.4; 2007-09-10; Andreas ...
SCGCQ00341724 Defect FW allows a firmware to be flashed through Online FW Update method in DOS and then breaks into montask SCGCQ00342848 Defect Add Adapter restart support in CLI SCGCQ00342993 Defect...
that file, you will need to merge them into the supplied local.sh file. 2. The unlocker needs to be re-run after an upgrade or patch is installed on the ESXi host. 3. The macOS VMwwre tools are no ...