I created a trigger in a SQL 2008 database that I was hoping would round the unit price. The following is my trigger:
CREATE TRIGGER [dbo].[ROUNDUNITPRICE]
AFTER INSERT, UPDATE
UPDATE SOP10200 SET SOP10200.UNITPRCE =
ROUND(SOP10200.UNITPRCE, 2, 1)
This did not work, though. No change took place to my unit price and, in fact, my app froze before giving me a timeout error.
Where am I going wrong with the syntax?
Thanks! Much appreciated!