0
您好我正在使用連接到oracle服務器的sqldeveloper。我試圖將該日期更改爲觸發器當週的星期一,但它說Warning: execution completed with warning
,任何人都可以看到我在這裏做錯了嗎?在SQL觸發器中設置日期到星期一
CREATE OR REPLACE TRIGGER trg_week_menu
BEFORE INSERT OR UPDATE OF week_start ON week_menu FOR EACH ROW
BEGIN
IF DATEPART(dw, :NEW.week_start) != 1 THEN
SELECT DATEADD(ww, DATEDIFF(ww, 0, :NEW.week_start), 0)
INTO :NEW.week_start
FROM sys.dual;
END IF;
END;
在此先感謝! =)
好,好,我會考慮一下,謝謝! =) – geekman92 2012-02-19 20:05:22