How to downgrade a statement for SSIS

ssisssis-2012

Following snippet works within SSIS 2012 — derive colum block.

TOKEN(REPLACE(@[User::FileName],".csv",""),"\\",TOKENCOUNT(REPLACE(@[User::FileName],".csv",""),"\\"))

But it does not work within SSIS 2005. TOKENCOUNT was not recongnized according to the error dialog. Any suggestions which alternative could be used?

Best Answer

REPLACE(RIGHT(@[User::FileName],FINDSTRING(REVERSE(@[User::FileName]),"\\",1)-1),".csv","")