1

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?

  • What version of SSIS are you trying to find compatibility for? – Thomas Stringer Sep 25 '13 at 16:01
  • existing 2012 stuff down to 2005 (no joke). sql servers are dev edition. – mnemonic Sep 26 '13 at 9:11
1
REPLACE(RIGHT(@[User::FileName],FINDSTRING(REVERSE(@[User::FileName]),"\\",1)-1),".csv","")
  • a parenthesis was removed when using your solution. thx a lot. – mnemonic Sep 26 '13 at 17:33
  • Whoops! Corrected. – SQLFox Sep 30 '13 at 15:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.