Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trigger Question..
Message
De
08/08/2000 13:33:59
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Titre:
Trigger Question..
Divers
Thread ID:
00402374
Message ID:
00402374
Vues:
48
I am trying to add code to my update trigger to calculate a annual, hourly and pay freq amount to store back to the table. After I calculate the values I have to following update:

update ee_job set
salary = @salary,
hour_rate = @hour_rate,
freq_rate = @freq_rate
where job_id = (select job_id from inserted)

This works fine if I am updating a sinlge record... but, if I try to run a select like...

update ee_job set mode = mode

to get the data in all records updated, I am told that the subquery returns more than one record. How can I limit the select into inserted to match the record that I am working with in the trigger?

Thanks,
BOb
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform