Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do you APPEND FROM?
Message
 
To
25/05/1999 15:15:33
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00222620
Message ID:
00222635
Views:
16
>I want to perform a APPEND FROM and here is my code:
>
>use new_table
>append from old_table
>
>The problem is there is a fld in my new_table called new_value
>and a fld in my old_table called old_value. I want the values in old_value to be inserted in the fld called new_value. What would the code look like to do something like this? thanks

Rob,

APPEND FROM will not work with different field names, so there are several ways to do this.
You may SCAN you old_table and use INSERT INTO which allows to specify source (field, or variable or hard coded value) and target fields.
You may add old_value field to your new_table, do APPEND FROM, then REPLACE ALL new_value WITH old_value. Depending on what your are trying to accomplish (is it one-time operation or will it repeat all the time in your app) you may even do it on the fly using ALTER TABLE command (remember it needs the EXCLUSIVE use of the table)

Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform