I trying to write an SSIS expression to get the right part of a string before the separator and then put the new string in a new column. I have used Substring and Findstring
Data:
| COMPANY |
|----------------------------|
| Virgin Altantic - F30008 |
| Google - F38115 |
| Google youtube - F38115169 |
Derived Column Code:
NewColumn1
SUBSTRING(Company,1,LEN(Company) - FINDSTRING(REVERSE(Company),"-",1) - 1)
NewColumn2
SUBSTRING(Company,LEN(Company) - FINDSTRING(REVERSE(Company),"-",1) + 3,FINDSTRING(REVERSE(Company),"-",1) - 2)
Result: