Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Appending one record.
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00304200
Message ID:
00304224
Views:
32
If you're going to INSERT FROM MEMVAR, they don't have to be in the same order. Keep in mind that only fileds with the same name will be successfully inserted.

>>>What is the easiest way to append all the fields from one (current) record in a table to a second table? The table I want to copy the fields to contains more fields than the first and the order of the matching fields does not corrispond to the order of fields in the first table.
>>>
>>>I've been using insert but it makes for very large statement because I have to spellout all the fields in both tables.
>>>
>>>Is there something like Append which matches fields in the target table regardless of their order?
>>>
>>>TIA
>>>
>>>Ken Ward
>>
>>SELECT < 1st Table >
>>SCATTER MEMVAR MEMO
>>SELECT < 2nd Table >
>>INSERT INTO < 2nd TAble > FROM MEMVAR
>>
>>or use Mark's suggestion.
>
>
>But doesn't insert require the field order of the target table to be the same as order of the memvars? I can't be sure that they are.
Michael Helms

May the Schwartz be with you.<(©¿©)> -- Mel Brooks
"Someday, and that day may never come, you will be called upon to perform a service" -- Vito Corleone
"Live like there is no tomorrow, Dance like no one is watching, Love like you've never been hurt." -- Anonymous
"I'm thinking about joining the campaign for shorter tag lines." -- Me
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform