select left('Hello World /Ok',charindex('/','Hello World /Ok')-1)
Hello World
That works fine.
However I got an error message:
select left('Hello World Ok',charindex('/','Hello World Ok')-1)
Instead of:
'Hello World Ok'
I get:
Server: Msg 536, Level 16, State 3, Line 1
Invalid length parameter passed to the substring function.
Microsoft Doc incorrectly says:
"LEFT...