我真是一脸懵逼…………
谁能告诉我为什么
charindex('\', REVERSE('test\henrov')) as char1,
charindex('\', REVERSE('test\henrov'))-1 as char2,
len(RIGHT('test\henrov', charindex('\', REVERSE('test\henrov'))))-1 as test,
right('test\henrov',6) as [OK],
right('test\henrov', charindex('\', REVERSE('test\henrov'))-1) as [ALSO_OK]
作品和
charindex('\', REVERSE(m.username)) as char1,
charindex('\', REVERSE(m.username))-1 as char2,
len(RIGHT(m.username, charindex('\', REVERSE(m.username))))-1 as test,
right(m.username,6) as [OK],
right(m.username, charindex('\', REVERSE(m.username))-1) as [NOT_OK]
不工作?m.username 是一个包含 'test\henrov' 的 varchar .....
我收到一个错误:传递给 RIGHT 函数的长度参数无效。