← Back to Kurakani

Any expert in SQL Server

Original Post

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

Mukurdhom
Dec 1, 2010 1:53 PM · 11,172 views
2 Replies
marulez Dec 1, 2010 2:17 PM
As long as you have delimeter you should be good to go. My recommendation is to create a function or stored procedure which splits the string depending upon the delimeter and return the result in table. Here is a solution which might help you: http://www.codeproject.com/KB/... Also in stackoverflow: http://stackoverflow.com/quest...
Mukurdhom Dec 1, 2010 3:10 PM
Thank you Marulez...
Login to join the conversation.

You might be interested in...

Recent Classifieds View all
Upcoming Events View all
Service Providers View all
Ask Sajha AI Assistant