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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy table from one database to another? 1

Status
Not open for further replies.

sohrab100

Programmer
Jan 18, 2002
56
HK
If i have to database with the same name, e.g DB, in different folder (actually the same program/database (a new and an old one), i want to copy the record from the old to the new, when i use the command "set database to db", i can't set to the database i want, what can i do?

sohrab100
 
Hi Sohrab,

There is no alias clause for databases, but you can open two tables by the same name in two databases:

Code:
close all
use g:\apps\buchan06\buchdata\miller_dri\bucpj alias me
select 0
use g:\apps\buchan06\buchdata\flottaterm\bucpj alias him
select me

This open two identical tables from different databases - calling one me and the other him. You could then copy data from one table to the other.

Is that what you want? or is it the database itself you wish to change?

HTH

Regards

Griff
Keep [Smile]ing
 
Use: SET DATABASE TO "fullPathToDatabase".
Example: OPEN DATABASE "C:\Test\MyDatabase"
OPEN DATABASE "F:\Production\MyDatabase"
SET DATABASE TO "C:\Test\MyDatabase"




Andy Rice
San Diego, CA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top