Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Datalinks and inserting between DBs

Options
  • 06-02-2013 7:26pm
    #1
    Registered Users Posts: 84 ✭✭


    Hi, I've already set up a database link between my two databases.

    I am now trying to insert 1 record from a table on database a into the same named table on database b. Records already exist on database b though so I only want to insert one new record and not delete any existing ones.

    I'm struggling to get it right though. Can someone review what I've suggested below?

    insert into destinationdb tablename
    select * from sourcedb tablename
    where customernumber = 'ABC';


Comments

  • Registered Users Posts: 419 ✭✭Mort5000


    Are you getting an error?

    It should be something on the lines of:
    insert into schemaname.tablename@databaselinkname select * from tablename
    


Advertisement