Subject | multirow consideration in FB |
---|---|
Author | mugi yanto |
Post date | 2008-07-22T05:01:47Z |
Hello, i would like to ask is it a multirow consideraton runs too at FB ?
if it's run then how to create a trigger in FB from this quote of my mssql trig:
CREATE TRIGGER intrig
ON sales
FOR INSERT AS
IF @@ROWCOUNT = 1
BEGIN
UPDATE titles
SET ytd_sales = ytd_sales + qty
FROM inserted
WHERE titles.title_id = inserted.title_id
END
ELSE
BEGIN
UPDATE titles
SET ytd_sales = ytd_sales +
(SELECT SUM(qty)
FROM inserted
WHERE titles.title_id = inserted.title_id)
WHERE titles.title_id IN
(SELECT title_id FROM inserted)
END
TIA,
mugi.
[Non-text portions of this message have been removed]
if it's run then how to create a trigger in FB from this quote of my mssql trig:
CREATE TRIGGER intrig
ON sales
FOR INSERT AS
IF @@ROWCOUNT = 1
BEGIN
UPDATE titles
SET ytd_sales = ytd_sales + qty
FROM inserted
WHERE titles.title_id = inserted.title_id
END
ELSE
BEGIN
UPDATE titles
SET ytd_sales = ytd_sales +
(SELECT SUM(qty)
FROM inserted
WHERE titles.title_id = inserted.title_id)
WHERE titles.title_id IN
(SELECT title_id FROM inserted)
END
TIA,
mugi.
[Non-text portions of this message have been removed]