Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transferring data from one db to another

Status
Not open for further replies.

Odd26

Programmer
Jun 3, 2003
4
0
0
CA
Hi everyone,

What is the correct SQL syntax to transfer data from one SQLBase database to another. In MS SQL Server 2000,
databasename.dbowner.tablename seem to do the trick.

Please advise,

Audrey
 
What is the condition of the destination database? Is it an empty schema? Is it a copy of the source db? Does it contain data from a different schema? Your copy options depend on the conditions of the destination db.
 
Hello,

One can copy data from one source table to another the following maner,

Copy <cursor number> source table to <cursor number> destination table;

e.g SQL> COPY EMP TO 2.EMPLOYEES;

NOTE : THE DESTINATION TABLE MUST EXIST.
If you have toconnect toanother DB and copy from another table,
SQL> Connect DatabaseName 2 Username/Password;
SQL> Create TABLE <TABLENAME> ( COL1 DATATYPE, COL2 DATATYPE......);
SQL>COPY 1.TABLENAME TO TABLENAME2;

Let me know if this helped.

regards....
indoaryaan.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top