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
 General SQL Server Forums
 New to SQL Server Programming
 PL/SQL Split string into two column

Author  Topic 

kaidi223
Starting Member

1 Post

Posted - 2012-04-13 : 23:40:27
Hi Guys

I wonder if any one can help me, I a bit of a noob. I need to split to a string from one table and split into two columns in another table. There is a few different variety of numbers and rules but no clear delimiter. I was how this can be done. Do I use combo of SUBSTR and INSTR or use if then loops to satisfy all the rules.
Thanks in advance.

Table

5 Kent Street
3 A lindt Street
2/15 bold Street
9/34-36 carmen Road
12/5a sandford Street

Result

Number |Street
----------------
5 |Kent Street
3A |lindt Street
2/15 |bold Street
9/34-36 |carmen Road
12/5a |sandford Street

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2012-04-13 : 23:47:00
try post over at dbforums.com. SQLTeam.com is on Microsoft SQL Server


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2012-04-17 : 04:21:52
<<
Do I use combo of SUBSTR and INSTR
>>

Yes use those functions

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -