Re: Inserting Into Remote Tables

Suresh Sane

Re: Inserting Into Remote Tables
(in response to Michael Dempsey)
Michael -

The insert is fine - the problem is that you are referncing objects from 2
subsystems in 1 sql. This is (currently) not permitted. You will have the
same problem with a select that joins 2 such tables.

If you have qmf, you can get around this by selecting from remote, saving it
local and then insert to local with select from local (of course you can
user export or any other means also).

HTH

Suresh


>From: "Dempsey, Michael" <[login to unmask email]>
>Reply-To: DB2 Data Base Discussion List <[login to unmask email]>
>To: [login to unmask email]
>Subject: Inserting Into Remote Tables
>Date: Thu, 11 Jan 2001 10:31:40 -0500
>
>Hey Folks..
> I'm able to select data remotely. From our development subsystem
>when
>I'm in production (different LPAR's). But when I try to insert into our
>development subsystem from our production subsystem, I get a -512,
>statement
>reference to remote object is invalid.. Here's the sql..
>
>insert into mvs2db2.owner.tab1
> select * from mvs1db2.owner.tab1 where cpk_mrno = 'xxxxx'
> Any help would be appreciated.. Thanks..
>
>Michael Dempsey
>UNC Health Care System
>
>
>
>
>

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com



Michael Dempsey

Inserting Into Remote Tables
Hey Folks..
I'm able to select data remotely. From our development subsystem when
I'm in production (different LPAR's). But when I try to insert into our
development subsystem from our production subsystem, I get a -512, statement
reference to remote object is invalid.. Here's the sql..

insert into mvs2db2.owner.tab1
select * from mvs1db2.owner.tab1 where cpk_mrno = 'xxxxx'
Any help would be appreciated.. Thanks..

Michael Dempsey
UNC Health Care System



Kurt Sahlberg

Re: Inserting Into Remote Tables
(in response to Suresh Sane)
Michael,
DB2 does not support this function as of yet.
You can select and delete using 3 part names but not insert from
a remote table. I believe this function will be available in a future
release of DB2.
Maybe someone from IBM will comment on this.
HTH
Kurt

>>> [login to unmask email] 01/11/01 09:31AM >>>
Hey Folks..
I'm able to select data remotely. From our development subsystem when
I'm in production (different LPAR's). But when I try to insert into our
development subsystem from our production subsystem, I get a -512, statement
reference to remote object is invalid.. Here's the sql..

insert into mvs2db2.owner.tab1
select * from mvs1db2.owner.tab1 where cpk_mrno = 'xxxxx'
Any help would be appreciated.. Thanks..

Michael Dempsey
UNC Health Care System