![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm quite new to DB2 and I have problem with Merge and IDENTITY_VAL_LOCAL. Sql looks like this: MERGE INTO table1 oo USING (SELECT 'somechar' AS NAZWA FROM SYSIBM.SYSDUMMY1) nn ON oo.NAZWA = nn.NAZWA WHEN NOT MATCHED THEN insert (ID,NAZWA) values (DEFAULT,'somechar') else ignore; values IDENTITY_VAL_LOCAL() always returns NULL even when insert is performed. However calling "insert into table1 (...) values (...)" returns proper value What to do in order to make it work? DB2 9.7.4 Express-C -- Adam |
![]() |
| Thread Tools | |
| Display Modes | |
| |