用逗号将一个字符串分割成几列

用逗号将一个字符串分割成几列,第1张

逗号将一个字符串分割成几列

在我看来,您只需要使用

split_part
function创建列,就像这样:

SELECt    split_part(Block, ',', 1) AS Block1,    split_part(Block, ',', 2) AS Block2,    split_part(Block, ',', 3) AS Block3,    split_part(Block, ',', 4) AS Block4,    split_part(Block, ',', 5) AS Block5,    split_part(Block, ',', 6) AS Block6,    split_part(Block, ',', 7) AS Block7,    split_part(Block, ',', 8) AS Block8,    split_part(Block, ',', 9) AS Block9FROM    your_table


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5618262.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-15
下一篇 2022-12-15

发表评论

登录后才能评论

评论列表(0条)

保存