文字列がcom.test.edu.personal.SomeException: this is some error: test message
です。私はSomeException: this is some error
という文字列を取得する必要があります。SQL Serverの特定の文字の間に部分文字列を取得する方法
私は私のコードとのトラブルを抱えています:
declare @col varchar(100)
set @col = 'com.test.edu.personal.SomeException: this is some error: test message'
SELECT
SUBSTRING(@col,
LEN(@col) - CHARINDEX(':', @col) - CHARINDEX(':', REVERSE(@col)),
LEN(@col) - LEN(LEFT(@col, CHARINDEX ('.', @col))) - LEN(RIGHT(@col, LEN(@col) - CHARINDEX (':', @col))));
私はnal.SomeException: this is some
を取得しています - 私は
があることを定義するルールはどのようなものがあり、ここで何かが欠けています特定の部分文字列? –