Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
>Yes, this could be done as an ad-hoc thing, but I'm finding it hard to picture a general solution for an n-level heirarchy based on p-views that are then filtered. For this to work, the grandchild view would have to be parameterized on the top-level parent, then filtered on its own immediate parent, instead of simply being parameterized on its own parent. At n levels, this creates quite a bowl of spaghetti, as each child, grandchild, etc. would have to contain a foreign key to the top level. A totally general solution allowing an n-level heirarchy to be handled in any situation would require each child table to contain a foreign key to every table at every level above it. The troubles multiply geometrically.
No... I don't think so... remember, the parameters only come in when you a querying the back end.
You always relate records from parent to child with a single FK... why would you need two just to set a filter? Just
set filter to CustID = Customer.ID
Or...
set filter to InvoiceID = Invoice.ID
BOb
Précédent
Suivant
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