开发者

ANSI SQL 92: find last occurrence of character

I need a ANSI SQL 92 statement to change all characters following the last '/' character to lower case.

On Sybase I would write:

update t开发者_JAVA百科able 
set col = left(col, len(col)-charindex('/', reverse(col))) ||
          lower(right(col, charindex('/', reverse(col))))

I can find all functions in ANSI SQL 92 but the REVERSE function, that I just use to find the last occurrence of the slash.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜