Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trigger Question..
Message
From
08/08/2000 13:33:59
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Title:
Trigger Question..
Miscellaneous
Thread ID:
00402374
Message ID:
00402374
Views:
47
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
Next
Reply
Map
View

Click here to load this message in the networking platform