I want to insert my split string into my table as you can see :
create table #Organization
(
organizationId bigint,
provienceId bigint,
CityId bigint,
TownId bigint
)
Insert Into #Organization ( organizationId)
select p.value from string_split('1,2,3', ',') p
Insert Into #Organization ( provienceId)
select p.value from string_split('1,2,3', ',') p
Insert Into #Organization ( CityId)
select p.value from string_split('1,2,3', ',') p
Insert Into #Organization ( TownId)
select p.value from string_split('1,2,3', ',') p
My expected result is something like this :
1 1 1 1
2 2 2 2
3 3 3 3
But it returns this :
