SQLTeam.com | Weblogs | Forums

SSIS Extract text

I have a field with the follwoing text

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


what the best way to do this in ssis

anyone any ideas?

An expression using FINDSTRING and SUBSTRING

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

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