Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
>Hi John,
>
>So, I have several tables, one is the 'main' table. They all have a field named 'product' (product name). Each table is indexed on this field. the main table has one product name that is different in each record. One of the other tables (one to many relationship) has the same product name in several records as each record is a 'component' of the formulation for the product. Is that the problem? I don't get it. Seems like I Have to have the product in each record. help.
>
>
So, the key for the MAIN table is Product... so it is unique for that table... but that is not a valid Key for the child tables... you need a UNIQUE value to identify each record... remember, with Views the table update creates a SQL statment to update the record, based on your keyfield...
Update MyTable Where KeyField='ThisValue' blah
See... the problem. Is there a field that uniquly identifies the child record... if not how about TWO fields? Most recomend creating an ID field... this is a field your users never see, but you use in the background to identify the record.
BOb
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement