Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Mark,
>Try your sample when a child table does not have records. That's when LEFT JOIN comes to play.
Sure...if no child, then the child fields will have NULLs in them. You will have to account for that in the interface...or are you saying the view errors out when you try to execute it?
If it doesn't error out, why does it matter what the view comes back with? The NULLs can be dealt with via use of NVL() (you could even use NVL() within the view to make sure no NULLs come back). Once you have the view back you can still add new records or edit existing records and have them write back to the child table.
What about switching all of this to use a simpler one-table parameterized view? As you go through the parent records, refresh the child data by changing a parameter on the child view and REQUERY()ing. Then that child view can be edited or added to, and since you know what parent you are on you can keep all the links in sync...?
Good luck...
JoeK
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