SqlExp: Substr now emits 'substring' for MSSQL

git-svn-id: svn://ultimatepp.org/upp/trunk@7874 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2014-11-09 09:59:08 +00:00
parent 09098fb680
commit 63ad0729bf
2 changed files with 2 additions and 2 deletions

View file

@ -371,7 +371,7 @@ SqlVal Substr(const SqlVal& a, const SqlVal& b) {
SqlVal Substr(const SqlVal& a, const SqlVal& b, const SqlVal& c)
{
return SqlFunc("SUBSTR", a, b, c);
return SqlFunc(SqlCase(MSSQL, "substring")("substr"), a, b, c);
}
SqlVal Instr(const SqlVal& a, const SqlVal& b) {

View file

@ -292,7 +292,7 @@ SqlVal Upper(const SqlVal& exp);
SqlVal Lower(const SqlVal& exp);
SqlVal Length(const SqlVal& exp);
SqlVal UpperAscii(const SqlVal& exp);
SqlVal Substr(const SqlVal& a, const SqlVal& b);
SqlVal Substr(const SqlVal& a, const SqlVal& b); // Deprecated, use 3 args variant bellow
SqlVal Substr(const SqlVal& a, const SqlVal& b, const SqlVal& c);
SqlVal Instr(const SqlVal& a, const SqlVal& b);
SqlVal Wild(const char* s);