SQLTeam.com | Weblogs | Forums

SSIS Extract text


#1

Hi
I have a field with the follwoing text

i want just the
Bank Of new yourk
jp morgan
jpm cast

etc

what the best way to do this in ssis


#2

anyone any ideas?


#3

An expression using FINDSTRING and SUBSTRING


#4

im usng the find string and sub string

SUBSTRING(Gl_Tb_Account_Description,1,LEN(Gl_Tb_Account_Description) - FINDSTRING(REVERSE(Gl_Tb_Account_Description),"-",1) - 1)

it removes some of the data to the left after the - but because there is more than 1 - it doesnt remove it all. how can i get to to remove it all


#5

Considering the variety of formats, at this point I'd write a script component. A few lines of C# or VB would do the trick easily and clearly