Skip to content
Advertisement

Insert Select into with same ID

Insert Split Delimited Strings in a Column with same ID.

Lets say I have demo setup as follows:

I declare some variables

Note: the @addresses sting is dynamic and not fixed

Now my aim is to insert into table EMPLOYEEID_Address multiple address with same the id using the STRING_SPLIT function.

So I tried:

But this didn’t work, while

works with result as:

Is there any way I can achieve this or a better way to achieve my target table with id and string passed as parameters?

Advertisement

Answer

I think you want:

The column returned by string_split() is called value.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement