如何根据字符组合拆分字符串?

时间:2016-04-08 05:31:50

标签: sql-server tsql

我有这个字符串:cat_index

让我们说如果我有这个字符串:cataloginventory_stock_item

我创建了一个函数:

at_inventory_in_stock

当我运行时:

product_id

我得到输出report_event。 我做错了什么

2 个答案:

答案 0 :(得分:1)

SELECT endpos + 1更改为SELECT endpos + LEN(@Delimiter)

答案 1 :(得分:0)

我希望这个代码套件能满足您的需求:

RigidBody Gravityscale