left most character is an alpha or number?
Hi, How do I do a conditional check for the left most character if it is an alpha or number in a Derived Column Transformation? Something like ISNUMERIC(newseq) ?"ABC" : "DEF" Thanks
February 24th, 2006 2:14am

There isn't an ISNUMERIC() function, but you could do something like the following: FINDSTRING("0123456789ABCDEF",UPPER(SUBSTRING(newseq,1,1)),1) > 0 ? "ABC" : "DEF" Just make the first parameter of the FINDSTRING be the complete set of characters you are searching for. You could also do comparisons, but then you would have to repeat the SUBSTRING() a number of times: (SUBSTRING(newseq,1,1) >= "0" && SUBSTRING(newseq,1,1) <= "9") || (UPPER(SUBSTRING(newseq,1,1)) >= "A" && UPPER(SUBSTRING(newseq,1,1)) <= "Z") ? "ABC" : "DEF"
Free Windows Admin Tool Kit Click here and download it now
February 24th, 2006 2:58am

Here are some other workarounds for the missing IsNumeric expression: http://microsoft-ssis.blogspot.com/2011/04/isnumeric-or-isnumber-expression-is.htmlPlease mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com
April 8th, 2011 6:21pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics