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!

Replace index

Status
Not open for further replies.

shangrilla

Programmer
Nov 21, 2001
360
US
Hi:

I want to copy the indexes from one table to another.

select * from table1 to table1_1
use in table1_1
USE table1_1 INDEX table1.cdx

I am trying to have the same indexes for both table1 and table1_1
 
I think you would need to re-create the index on the second table.
Or just copy.
COPY FILE table1.dbf to table1_1.dbf
COPY FILE table1.cdx to table1_1.cdx

 
I could not get

select * from table1 to table1_1

to work at all.

select * from table1 INto TABLE table1_1

works.

The best way to also reproduce the indexes

select * from table1 INto TABLE table1_1 WITH CDX [or WITH PRODUCTION (if you like to type more characters)]

Marc

marcmorris@attbi.com



 
I made a mistake...

I was trying to save some typing.

the command that works is

use table1
copy all to table1_1 WITH CDX [or WITH PRODUCTION]

Sorry about that. I seem to always get my best ideas after I've clicked the SEND button.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top