Quantcast
Channel: SCN: Message List - SAP MaxDB
Viewing all articles
Browse latest Browse all 2539

Re: Parsing error -8 when update-clause used with nextval

$
0
0

Hello Chris,

I tried to recreate the error with my 7.7.07.48 database, but everything worked as expected.

 

Here is my setup:

create table "MONA"."PARSEAGAIN"(

"SPALTE_A" CHAR (1) ASCII,

"SPALTE_B" CHAR (1) ASCII,

"SPALTE_C" CHAR (1) ASCII,

"SPALTE_D" CHAR (1) ASCII,

"SPALTE_E" CHAR (1) ASCII,

"SPALTE_F" INTEGER)

 

CREATE SEQUENCE seq_syncid

insert into mona.parseagain (SPALTE_A, SPALTE_B, SPALTE_C, SPALTE_D, SPALTE_E, SPALTE_F) values (1,2,3,5,6,seq_syncid.nextval)
update mona.parseagain (SPALTE_A, SPALTE_B, SPALTE_C, SPALTE_D, SPALTE_E, SPALTE_F) values (5,4,3,2,1,seq_syncid.nextval) where (SPALTE_F = 1)
-> works fine

insert into mona.parseagain (SPALTE_A, SPALTE_B, SPALTE_C, SPALTE_D, SPALTE_E, SPALTE_F) values (?,?,?,?,?,seq_syncid.nextval)
update mona.parseagain (SPALTE_A, SPALTE_B, SPALTE_C, SPALTE_D, SPALTE_E, SPALTE_F) values (?,?,?,?,?,seq_syncid.nextval) where (SPALTE_F = ?)

-> works fine

Do you see any difference to your test case?

Thorsten

PS:
You are probably aware of it, but please note that iin case you just need a simple '+1 counter' for a specific table, the use of 'DEFAULT SERIAL' as table attribute would be much easier...


Viewing all articles
Browse latest Browse all 2539

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>