S
SoDakRah
I need to update a date field in a table when a trigger fires on a table. I
use this code:
CREATE TRIGGER Update_IMA_CycleDate ON ITR
FOR UPDATE
AS
IF UPDATE ITR_Reason like 'Cycle*'
BEGIN
UPDATE ITEM Set IMA_CycleDate = Format(Date(),"mm/dd/yyyy hh:mm")
inner join Item on ITR_ItemID = IMA_ItemID where
Inserted.ITR_ID = ITR.ITR_ID
End
I get Error 195: 'Date' is not a recognized function name. Any ideas why?
use this code:
CREATE TRIGGER Update_IMA_CycleDate ON ITR
FOR UPDATE
AS
IF UPDATE ITR_Reason like 'Cycle*'
BEGIN
UPDATE ITEM Set IMA_CycleDate = Format(Date(),"mm/dd/yyyy hh:mm")
inner join Item on ITR_ItemID = IMA_ItemID where
Inserted.ITR_ID = ITR.ITR_ID
End
I get Error 195: 'Date' is not a recognized function name. Any ideas why?