Dear all,

I am wondering whether constant arguments are required in string functions, e.g.

Substring(str, pos, len).

Given MyTable: 
    ...
    MyString  TEXT,                                            (muti-byte characters)
    MyPos     UNSIGNED(10),
    MyLength UNSIGNED(10).

While (1) works well, (2) would return strange characters.

(1)SELECT SUBSTRING(MyString, 1, 1)

(2) SELECT SUBSTRING(MyString, MyPos, MyLength)
FROM MyTable

What's wrong with SQL (2)? 

Reply via email to