Trigger to update price a,b,c

HI, i am a bigginer in sql ,Is the following trigger can be used in HQ ?( i modified it from this forum ) thanks

CREATE TRIGGER [utr_Item_Cost_LowerBound_Insert] ON [Item] FOR INSERT, UPDATE AS IF UPDATE (PRICE) /*************************************************** utr_Item_Cost_LowerBound_Insert sets LowerBound to price * 0.9% when item is created.

***************************************************/ BEGIN UPDATE Item SET PRICELowerBound = i.price * .9 SET PRICEA = i.price * .95 SET PRICEB= i.price * .9 SET PRICEB= i.price * .85 FROM Item INNER JOIN INSERTED i on Item.ID= i.ID END
Reply to
Sad
Loading thread data ...

yes, can be used in HQ, and the syntax looks correct. any problems w/ it?

Reply to
Kaibin

thank you kaibin i tried this trigger on HQ it was ok ( thier is little change)

CREATE TRIGGER [utr_Item_Cost_LowerBound_Insert] ON [Item] FOR INSERT, UPDATE AS IF UPDATE (PRICE) /*************************************************** utr_Item_Cost_LowerBound_Insert sets LowerBound to Price * .9% when item Price is updated or item created.

***************************************************/ BEG> yes, can be used in HQ, and the syntax looks correct. any problems w/ it? > > --
Reply to
Sad

BeanSmart website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.