Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trouble adding field to table in specific position
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00891465
Message ID:
00891558
Vues:
23
Since I have to validate the structure anyway, I tested for the name of the field and used alter table if it was different to make sure the field names match the upload structure. Then I could query the table and add the new fields needed at the same time then append from to the fix structure of the upload table for uploading.
Thanks for answering

>>We have to have a table with fields in a specific order to upload to a mainframe. The field names do not matter, just the location of the fields. I want to be able to take any table that has 52 fields with each having the correct data type and size and add 4 fields to it in a specific place. I looked a the FAQ and one answer I found referred to a bubble sort but that is to complicated for the number of fields. The problem is other table fields may have different names and record size is too large for an array (which is what got me here in the first place). I currently use SQl with space() as fieldname to add fields, into array and append from array, but data is too large for array. Any ideas?
>>
>>Thanks, Chuck
>
>You can create another copy of the table, adding the four fields manually with CREATE STRUCTURE, or duplicating the entire structure with CREATE TABLE. Then, you can do an APPEND FROM.
Extreme Programming = Plan -> Design -> Code -> Test
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform