hello,
we are using:
- DB2 UDB V 8.1 FP-6 on LINUX as (local) federated DB
- DB2 UDB V 7.2 on AIX as datasource
we try to move part of an application (most of the tables) von AIX to
LINUX and acess a few remaining tables (on AIX) via the "federated DB"
feature.
setup (SERVER, WRAPPER, NICKNAMES, etc.) worked and select, insert on
the remote (AIX) tables works fine.
now i have the problem that i must access (get the NEXTVAL) of a
sequence which is remote defined (because i need it in a local
trigger, i dont't think that i can use the PASSTHRU option).
i next tried to define a remote function (which gets the NEXTVAL) and
map a local function to it.
didn't worked either (see below).
anybody, any ideas ? how to do it ?
joerg
----------------
CREATE FUNCTION GWV.jam_odsfunc(seqvalue BIGINT)
RETURNS BIGINT
LANGUAGE SQL
READS SQL DATA
NOT DETERMINISTIC
NO EXTERNAL ACTION
RETURN
values(nextval for gwv.ereignissequence)
DB21034E The command was processed as an SQL statement because it was
not a
valid Command Line Processor command. During SQL processing it
returned:
SQL0348N "NEXTVAL FOR GWV.EREIGNISSEQUENCE" cannot be specified in
this
context. LINE NUMBER=8. SQLSTATE=428F9
------------------