From 72c5b034bf1056c0a0bac67bbcdcfd41804fade1 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 19 Mar 2012 11:50:38 +0000 Subject: [PATCH] minor update --- plugins/dbms/mssqlserver/syntax.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/plugins/dbms/mssqlserver/syntax.py b/plugins/dbms/mssqlserver/syntax.py index 178cee8c9..33e83b8d9 100644 --- a/plugins/dbms/mssqlserver/syntax.py +++ b/plugins/dbms/mssqlserver/syntax.py @@ -30,14 +30,9 @@ class Syntax(GenericSyntax): lastIndex = firstIndex + index old = "'%s'" % expression[firstIndex:lastIndex] - unescaped = "" - for i in xrange(firstIndex, lastIndex): - unescaped += "%s(%d)" % ("CHAR" if ord(expression[i]) < 256 else "NCHAR", ord(expression[i])) - if i < lastIndex - 1: - unescaped += "+" + unescaped = "+".join("%s(%d)" % ("CHAR" if ord(expression[i]) < 256 else "NCHAR", ord(expression[i])) for i in xrange(firstIndex, lastIndex)) - #unescaped += ")" expression = expression.replace(old, unescaped) else: expression = "+".join("CHAR(%d)" % ord(c) for c in expression)