Hi, thanks i have learned one new thing today,
but the thing is i need to insert into the testtable
Select * from testtable
Rid,col1,col2,col3,col4,col5,col6
1 ,1,2,34,56789,1011,12
my testtable will be a dynamic one based on the input of the position in my example i have given
declare @STR varchar(100)='12345678910111213141516'
declare @pos varchar(50)='1,1,2,5,4,2'
@pos may increase or decrease if it increase i need to create my testtable accordingly ,here it is 6 splits so i am having 6 columns later i may get 15 columns so i need to create a testtable with 15 columns and so on and i need to insert the data vertically after splitting.