Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy data from table A to table B and add a field
Message
De
30/04/2004 18:56:17
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
30/04/2004 10:43:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00899769
Message ID:
00899956
Vues:
19
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform