Hello group, I am trying to create a WHERE clause that says
WHERE column_1 = TRIM(LEADING '20' FROM(DATEPART(year, GETDATE())))
Basically column_1
contains the fiscal year but the fiscal year is in the database as 8 or 9 not 2008 or 2009.
So I need to figure a way to trim off at least the '20'
so that the query will run correctly... The more dynamic the better because I need to set this up to run in an SSIS pkg and the less hard coding the better.
Any suggestions? Thanks in advance! Jon