-
Need help splitting a string with several different delimiters.
I am trying to split the following string which is held in one field of the table PTM_PARCEL_TEST. The problem I am having is I need to make a split function that uses several different delimeters.
The string from the table is in the field as -
NW¼ Sec 31 38-27-W4
What I need to accomplish is break the string into 5 different fields: Quarter, Section, Township, Range and Meridian. The delimeters would be the 1/4 symbol, Sec, - and 'W'. My end goal is to split the string and have it show up in a second table (STRING_TEST) as the following -
[Quarter] NW
[Section] 31
[Township] 38
[Range] 27
[Meridian] 4
There is always the same delimeters (1/4, Sec, -, W) and each string is formatted the same. Just not sure where to start if someone could suggest a similar function or point me in the right direction any help greatly appreciated, thanks!
-
Did you look at charindex and patindex function?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|