SQL Split Comma Separated Column on Delimiter

后端 未结 1 1930
故里飘歌
故里飘歌 2021-01-28 10:21

Here is a split function, it can apply as dbo.Split(\'sf,we,fs,we\',\',\'), when I change the string to column name it doesn\'t work, such as dbo.Split(table.

1条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-28 11:00

    That is because the function is returning a TABLE.

    SELECT Split(myColumn) FROM myTable
    

    will mean

    SELECT myOutputTableFromSplit FROM myTable
    

    It means, return a table from the table & SQL cannot do that.

    0 讨论(0)
提交回复
热议问题