> does it work outside the function?
Yes, If I run:
replacing cInput with 'JESSE', it returns "Jesse" as it should.
> did you tried SUBSTRING(cInput, 2)?
Tried replacing SUBSTRING(cInput FROM 2) with SUBSTRING(cInput, 2) and it
didn't make any difference.
> did you tried with converting?
I have had issues with this in other areas before, but didn't think about it
this time. However, I tred CONVERT with UTF8 and latin1 as you suggested.
> "LOWER() (and UPPER()) are ineffective when applied to binary strings
> (BINARY, VARBINARY, BLOB). To perform lettercase conversion, convert the
> string to a non-binary string:
> mysql> SET @str = BINARY 'New York';
> mysql> SELECT LOWER(@str), LOWER(CONVERT(@str USING latin1));"
I converted the function over to use a variable, and got the same results.
Here's the new function:
CREATE FUNCTION `ProperCase`(cInput TEXT)
SQL SECURITY INVOKER
Declare str Text;
Declare cReturn Text;
Set @str=BINARY cInput;
Set @cReturn =
Still doesn't work. This is driving me NUTz 8-p