SQL Script Question

I created a SSIS package that will update certain tables every year. Prior to updating these tables I want to run the "execute sql script" to change the current year to the next year automatically. For instance, I want to 2011 to 2012. I know I can update a column like...

update tablename
set columnname = 2012
where columnname = 2011

But I want to have this done automatically at the beginning of my SSIS package and not for just this year, but years to come, without having to worry about it. Is there a sql script that would perform this. Thanks in advance.

If the scenario is a little more complex, then you can use other methods like finding the MAX year in the table and incrementing that by +1. It just depends. Let me know if the above doesn't solve your scenario.

or, is it really necessary to have some column like that in a table at all???
What's the meaning of that column?? Which way do you use it in queries ??

0

TyecomAuthor Commented: 2011-10-12

Thank you both for responding. MWVISA1 your approach seems to be what I want, I will be testing it and will get back to you. jvejskrab, it is necessary to have these column, they are part of a larger scope. The SSIS package will be ran once a year at the end of each year. The tables will be updated with the current data and the year column needs to be updated to the next fiscal year. Again, I'm just trying to automate this entire process. It used to be done manually.