I need to create records in one file cabinet for a set of record from another cabinet, this must be done automatically once a year. The new records include a text field called year, I set a filter in the Trigger tab of Autoindex as in the screenshot, it's works perfectly. Now I want to make the year value dynamic based on the current date at the time of execution, is it possible to do that?
I tried this in (Where Clause): Year(GETDATE()) and Year(Now) but both failed!
Is there another way to achieve that?
Update: I also tried the following but without success, I don't think WHERE CLAUSE accept SQL expressions!
CAST(DATEPART(yyyy, GETDATE()) AS CHAR(4))