Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy data from table A to table B and add a field
Message
From
30/04/2004 18:56:17
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
30/04/2004 10:43:18
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00899769
Message ID:
00899956
Views:
20
>Enviroment VFP 7, existing tables on a Novel server, new tables on a local PC running Win2k.
>
>I have several tables which have an addition field. The new tables have test data in them. The new field is 1 character and has values A and B. I need to do the following:
>
>1. remove existing test data
>2. copy existing data and set new field to A
>3. copy existing data and set new field to B and set 3 numeric fields to zero
>
>What is the safest way to the do the above?
Select *, "A" as NewFieldName from RemoteTable into table LocalTable
...and variants thereof. In the next line you can also
select LocalTable
Blank All Fields num1, num2, num3
- which will set your three numeric fields to zero (insert your real table and field names here, of course).
After this, you may need to open the local table exclusively to index it.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform