Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Parse String SSIS

Author  Topic 

Johnph
Posting Yak Master

103 Posts

Posted - 2014-03-18 : 11:29:06
Hello, I want to parse a string in SSIS expression table. My strings looks like this:

CAT@@@DOG@@@yyyy
MOUSE@@@bbb@@@aaa
r@@@s@@@g

They are separated by @@@ and I need code that is able to pull the 1st or 2nd or 3rd characters.

Thanks.

Lamprey
Master Smack Fu Yak Hacker

4614 Posts

Posted - 2014-03-18 : 11:53:24
If there aren't any 3rd party components to do that, I think you'd have to use a script component/transform:
http://msdn.microsoft.com/en-us/library/ms228388.aspx
Go to Top of Page

sqlsaga
Yak Posting Veteran

93 Posts

Posted - 2014-03-19 : 11:08:19
You either have to use a T-SQL Split String function / similar or use a Script task as specified to do this.

Read more about a Split Function in SQL @ http://sqlsaga.com/sql-server/split-function-in-sql-server/

Visit www.sqlsaga.com for more t-sql snippets and BI related how to's.
Go to Top of Page
   

- Advertisement -