Posted by: Mukurdhom December 1, 2010
Any expert in SQL Server
Login in to Rate this Post:     0       ?        

Hello Gurus

I am banging my head from this morning. Did some google search. Found some example, but not helping me a lot.
Here is the problem

Given string : '152527_OR100006_UHNJ3241159000_1_.pdf'
My task: Parse the string into different column. 
FileID: 152527
SalesOrderNum: OR10006
ItemNumber: UHNJ3241159000
EdiLine: 1
FileType: .pdf

If the size of string was fixed, then it was not a big deal. Size of string is dynamic and "_" underscore is suppose to act as a delimiter. 

Thank you
Read Full Discussion Thread for this article