468,258 Members | 1,520 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,258 developers. It's quick & easy.

Merge does not work on 8.1.0

Hi,

I have developed an SQL-Script which I tested successfully on DB2
v8.1.3.132 (SQL08013). When I tried to run the script on a DB2 v8.1.0.36
(SQL08010) the script failed with the message

SQL0104N Auf "MERGE " folgte das unerwartete Token "INTO DB". Zu den
möglichen Token gehören: "<space>". SQLSTATE=42601

The english translation is probably this one:

SQL0104N An unexpected token "INTO DB" was found following "MERGE ".
Expected tokens may include: "<space>". SQLSTATE=42601
Does anybody know why the merge did not succeed? Are there any
differences between 8.1.0 and 8.1.3 or different configuration settings
which could be responsible for that?

Thanks
Sebastian

MERGE INTO DB.TABLENAME AS DEST USING (
SELECT
NAME NAME
, PLZ PLZ
FROM DB.TABLENAME_TMP) AS TEMP
ON (DEST.NAME = TEMP.NAME)
WHEN MATCHED THEN
UPDATE SET
DEST.NAME = TEMP.NAME
, DEST.PLZ = TEMP.PLZ
WHEN NOT MATCHED THEN
INSERT (
DEST.NAME
, DEST.PLZ )
VALUES (
TEMP.NAME
, TEMP.PLZ );
Nov 12 '05 #1
1 1723
Sebastian Luemmer wrote:
Hi,

I have developed an SQL-Script which I tested successfully on DB2
v8.1.3.132 (SQL08013). When I tried to run the script on a DB2 v8.1.0.36
(SQL08010) the script failed with the message

SQL0104N Auf "MERGE " folgte das unerwartete Token "INTO DB". Zu den
möglichen Token gehören: "<space>". SQLSTATE=42601

The english translation is probably this one:

SQL0104N An unexpected token "INTO DB" was found following "MERGE ".
Expected tokens may include: "<space>". SQLSTATE=42601\


The MERGE statement was introduced in FP2. The 8.1.0 is the GA level of DB2
V8.1. So you should install at least FP2 to get the MERGE functionality.

You can see that this is in FP2 and onwards by looking at the documentation
http://publib.boulder.ibm.com/infoce...n/r0010873.htm
The "2" at the left border marks that something has changed in the FP2 or
that this functionality is new.

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Joe Cosby | last post: by
reply views Thread by Private Pyle | last post: by
8 posts views Thread by Darryl Kerkeslager | last post: by
1 post views Thread by =?Utf-8?B?QmFkaXM=?= | last post: by
7 posts views Thread by giladp1 | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.