diff --git a/uppsrc/Sql/SqlVal.cpp b/uppsrc/Sql/SqlVal.cpp index 221788d6a..a6d6e19c0 100644 --- a/uppsrc/Sql/SqlVal.cpp +++ b/uppsrc/Sql/SqlVal.cpp @@ -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) { diff --git a/uppsrc/Sql/Sqlexp.h b/uppsrc/Sql/Sqlexp.h index 5aabae6cd..0549a4b56 100644 --- a/uppsrc/Sql/Sqlexp.h +++ b/uppsrc/Sql/Sqlexp.h @@ -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);