Hi Paul.
>I have AutoInc on a table, and have a view that uses this table. I add new record to this view and need to use the new record's PK as a FK in another view before doing the update. How do I do this?
You have to update the parent table before you can get the newly assigned PK to use in the child table. If you don't want to commit the change until after the child table has been updated, buffer the parent table. Of course, you'll have to use TABLEUPDATE() on the parent table as well as the view in that case, but it's the only way to get the new ID.
Doug
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