Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
De-Normalizing data
Message
De
25/02/2005 17:48:09
Jon Neale
Bond International Software
Wootton Bassett, Royaume Uni
 
 
À
25/02/2005 17:44:39
Jon Neale
Bond International Software
Wootton Bassett, Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
MS SQL Server
Divers
Thread ID:
00990780
Message ID:
00990786
Vues:
27
Sorry not sure what happend with the first message its late here.

How are you getting the list from master? are you selecting into a table or cursor? If its a cursor then it will be read only. i think a readwrite at the end of the SQL should help this.

Is there an unlimited amount of attribute a master can have?

jon


>>Hi All,
>>
>>I am creating an export procedure for an application I am working on. The application stores data in two main tables. A Master table that contains the name and address and an Attribute table that contains an Attribute Key, Master Key, Attribute Value and a "FieldName" field. The FieldName field is the name of the field in the exported data. The design is so that the client can add as much "Attributes" as they want to for each Master record.
>>
>>They may have more than one value for each attribute. For example, John Does may have two credit scores, one from January, one from June. The "Credit Score" attribute may have a "FieldName" value of "CredScr"
>>
>>I need the export file to look like this:
>>
>>Name       CredScr1  CrdScr2
>>=========  ========  =======
>>John Doe      560      580
>>
>>
>>I have the export procedure to where I can get the Master records in a cursor just fine (straight forward and simple). Now to get the Attributes enumerated and posted to the end of each record is the part I'm having trouble with.
>>
>>I originally thought of scanning through the Attributes for every exported record and executing ALTER TABLE as needed for additional fields. However, it seems that I cannot ALTER TABLE cursor. I've tried ALTER TABLE DBF() and that doesn't work I've tried ALTER TABLE and the Fox tells me the .tmp file is read only.
>>
>>Does anyone have any suggestions or know of any tools to do this?
>>
>>Aloha,
>>
>>James
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform