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

Copy a column from a table to another with different colum name

Status
Not open for further replies.

bundychicka

Programmer
Jul 8, 2014
2
FJ
Can someone help me with this issue please i run a Fox Pro Version 2.6a. I am wanting to copy the information from a column name Paid_in_s from a tranlink.dbf to a column name Acr_int in the members table. Can someone help me with this.

Thank You
 
Not enough information.

There has to be some common key between the two tables. In general you'd do something like this:

Code:
Select 0
Use tranlink
Set Order to (key)
Select 0
Use Members
Set relation to (key) into tranlink
Replace all ACR_int with tranlink.Paid_in_s

The variations are without limit depending on your circumstances, but it's SET RELATION that you're looking for.
 
Ok i can say that the common key can be their account numbers which is on another column.
 
Well, there you go! Replace (key) in my example with your index tag(s) on their account number.

What you probably want, though, is to *add* the value of the foreign column to the already existing column instead of replacing it. That's a horse of a different color. (Not much of a different color, but a different color just the same.)

But you haven't said you want that so I won't go into it.
 
You might want to look into SQL select. You can do it there.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top