FAQ
I was wondering if any SQL experts are on the list.
I need to update a field in my current database with a field from another database.

Any ideas how to do this through sql worksheet session?

Thanks,
Doris Goodson

Search Discussions

  • Jesper Haure Norrevang at Jan 11, 2005 at 2:16 am
    Doris,

    I have never claimed, that I am an expert, but
    I will try to answer anyway.

    What you need is a DATABASE LINK. The idea is
    that you with some restrictions can reference
    a remote table, e.g. test_at_AUDV, just as if it
    were a local table.

    I have made a quick and dirty test:

    On remote database

    drop table test;

    create table test
    (c varchar2(40));

    insert into test values
    ('This is remote data');

    commit;

    On local database

    create database link AUDV
    connect to jhn
    identified by remotepass
    using 'AUDV';

    create table localtab
    (c varchar2(40));

    insert into localtab values
    ('This is local data');

    update localtab
    set c =3D (select c

    from test_at_AUDV);

    commit;

    I hope this gives you an idea of
    how it is working.

    Regards
    Jesper Haure Norrevang

    -----Oprindelig meddelelse-----
    Fra: oracle-l-bounce_at_freelists.org =
    P=E5
    vegne af Goodson, Doris
    Sendt: 11. januar 2005 02:38
    Til: oracle-l_at_freelists.org
    Emne: Need SQL to connect remotely

    I was wondering if any SQL experts are on the list.
    I need to update a field in my current database with a field from =
    another
    database.

    Any ideas how to do this through sql worksheet session?

    Thanks,
    Doris Goodson

    =20
  • Ruth Gramolini at Jan 11, 2005 at 8:38 am
    Create a link to the second database. If you create public synonyms on the
    tables you need and put these into the first database, you can just access
    the tables by name. We run an entire application from 1 database on another
    using this method.

    HTH,

    Ruth

    -----Original Message-----
    From: oracle-l-bounce_at_freelists.org
    On Behalf Of Goodson, Doris
    Sent: Monday, January 10, 2005 8:38 PM
    To: oracle-l_at_freelists.org
    Subject: Need SQL to connect remotely

    I was wondering if any SQL experts are on the list.
    I need to update a field in my current database with a field from another
    database.

    Any ideas how to do this through sql worksheet session?

    Thanks,
    Doris Goodson

    --
    http://www.freelists.org/webpage/oracle-l

    --
    http://www.freelists.org/webpage/oracle-l

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouporacle-l @
categoriesoracle
postedJan 10, '05 at 7:37p
activeJan 11, '05 at 8:38a
posts3
users3
websiteoracle.com

People

Translate

site design / logo © 2022 Grokbase