Hassle-free live chat software re-imagined for business growth. 2 users, always free.
ALTER TRIGGER trig_delOrderLineEntry /* This trigger will update the productlines qty when items are deleted from the orderline table mainly in the ordersummary and the session.end */ ON orderlines FOR DELETE AS DECLARE @qty int, @prodid int SELECT @qty = (SELECT Qty FROM Deleted) SELECT @prodid = (SELECT prodlineid FROM Deleted) UPDATE ProductLines SET StockLevel = StockLevel + @qty WHERE (id = @prodid)
|Splitting the content of a column in SQL||11||21|
|Query / Window function ?||3||18|
|T-SQL: Carrying a Figure from One Row to the Next||14||33|
|Create formula that divides total amount by 30 or 31 depending on what month of the year it is looking at||5||23|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
12 Experts available now in Live!