diff --git a/uppsrc/Sql/SqlCase.cpp b/uppsrc/Sql/SqlCase.cpp index 770a59a89..22b1e3e91 100644 --- a/uppsrc/Sql/SqlCase.cpp +++ b/uppsrc/Sql/SqlCase.cpp @@ -337,9 +337,10 @@ String SqlCompile(const String& s) Vector SplitSqlSet(const SqlSet& set) { - const char *s = ~set; + String h = ~set; + const char *q = h; Vector r; - SqlCompile(s, NULL, ORACLE, &r); + SqlCompile(q, NULL, ORACLE, &r); return r; } diff --git a/uppsrc/Sql/SqlVal.cpp b/uppsrc/Sql/SqlVal.cpp index f79d5d1fb..221788d6a 100644 --- a/uppsrc/Sql/SqlVal.cpp +++ b/uppsrc/Sql/SqlVal.cpp @@ -358,7 +358,7 @@ SqlVal Lower(const SqlVal& exp) { } SqlVal Length(const SqlVal& exp) { - return exp.IsEmpty() ? exp : SqlFunc("length", exp); + return exp.IsEmpty() ? exp : SqlFunc(SqlCase(MSSQL, "len")("length"), exp); } SqlVal UpperAscii(const SqlVal& exp) {