I would like to know if and if it's possible how to split a string in to different columns.
So first of all I have the table tabOld which contains:
name |
---|
5522-rep__-4210-03-test-434907-emn-nt.pdf |
and the other table tabNew:
name | number |
---|---|
5522-rep__-4210-03-test-434907-emn-nt.pdf | 4210 |
So what I want to do is to copy the name from tabOld to tabNew and additionally split the 4210 from the pdf:
5522-rep__-4210-03-test-434907-emn-nt.pdf
into the column number in table tabNew via an SQL script.
I allready tried it with How Do I Split a Delimited String in SQL Server Without Creating a Function? but that didn' work.