用于拆分列数据的SQL查询 [英] SQL Query to split a column's data

查看:80
本文介绍了用于拆分列数据的SQL查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一张桌子,说tbl_test,格式如下。

tbl_test

I have a table, say tbl_test with data in following format.
tbl_test

_____________________
Action_Id
_____________________
123/221/4556/32
_____________________
5643/990
_____________________
676
_____________________



我希望输出将动作ID分成''/'并显示结果如下


I want the output to split the action id by ''/'' and show the result like this

Action_Id
_____________________
123
_____________________
221
_____________________
4556
_____________________
32
_____________________
5643
_____________________
990
_____________________
676
_____________________





它通过代码非常简单,但我需要它来自sql查询。



Its really simple through code but i need it from the sql query.

推荐答案

查看下面的文章,你刚才必须修改分隔符字符串,如果您有任何疑问请让我知道。



生成并拆分分隔的字符串列 [ ^ ]
Check my article below, you just have to modify the delimiter string, if you have any question please let me know.

Generating and splitting a delimited string column[^]


这篇关于用于拆分列数据的SQL查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆