I am trying to remove part of a string from another string, for example:
declare @url varchar (20)
set @url = 'www.test.com~~34235645463544563554'
select @url, substring(@url,1,CHARINDEX('~~',@url)-1)
I am trying to remove '~~34235645463544563554'
I am use to using the built in tsql functions (as shown above) to do this but trying to do the same thing in a step in ssis as a "derived column transformation". Can someone suggest how I can do this and whether there is a easy way to quickly test this out in management studio? ie using the expression written in ssis to test for the expected result. I would prefer not to run the whole thing as it is a big package.