fix #570
This commit is contained in:
parent
a0b6b62ba0
commit
15f11df2af
|
@ -1218,8 +1218,14 @@ func (statement *Statement) genSelectSQL(columnStr, condSQL string) (a string) {
|
||||||
fmt.Fprintf(&buf, " WHERE %v", condSQL)
|
fmt.Fprintf(&buf, " WHERE %v", condSQL)
|
||||||
}
|
}
|
||||||
var whereStr = buf.String()
|
var whereStr = buf.String()
|
||||||
|
var fromStr = " FROM "
|
||||||
|
|
||||||
|
if dialect.DBType() == core.MSSQL && strings.Contains(statement.TableName(), "..") {
|
||||||
|
fromStr += statement.TableName()
|
||||||
|
} else {
|
||||||
|
fromStr += quote(statement.TableName())
|
||||||
|
}
|
||||||
|
|
||||||
var fromStr = " FROM " + quote(statement.TableName())
|
|
||||||
if statement.TableAlias != "" {
|
if statement.TableAlias != "" {
|
||||||
if dialect.DBType() == core.ORACLE {
|
if dialect.DBType() == core.ORACLE {
|
||||||
fromStr += " " + quote(statement.TableAlias)
|
fromStr += " " + quote(statement.TableAlias)
|
||||||
|
|
Loading…
Reference in New Issue