SQL server database name field value is zhang SAN, li si, fifty... Now want them according to the comma split into different columns, how to deal with
CodePudding user response:
How many columns are dynamic? Each column dynamic a name?
CodePudding user response:
Please give the sample data, and expected results,
CodePudding user response:
Using STRING_SPLIT function,
-
SELECT the VALUE
The FROM uname CROSS the APPLY STRING_SPLIT ([name], ', ')
CodePudding user response: