Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Titre:
How to insert a value into a table with a Insert trigger
Hey All
As a newbie concerning SQL Server I just run into my first major problem (I bet there will legions of them still to follow :-) )
Using an Insert trigger, I can't figure out, how I can update a field of the table where the insert takes place with a value that is returned by a subquery.
An Update trigger doing the same job is working with no problem, using an SQL Update, but while the Insert it seems, that the update doesn't yet find the inserted row when the trigger fires and fails then of course.
Because I use MSDE or SQL7 I can't use an AFTER INSERT trigger to do that job.
So my question is, how do you solve that case?
TIA
Markus
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