Skip to content

Commit

Permalink
fixed SqlServer2000Processor sql template error
Browse files Browse the repository at this point in the history
  • Loading branch information
starpeng committed Sep 24, 2013
1 parent 23a9e6c commit 5b43130
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ public override bool TableExists(string schemaName, string tableName)

public override bool ColumnExists(string schemaName, string tableName, string columnName)
{
return Exists("SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = '{1}' AND COLUMN_NAME = '{2}'",
return Exists("SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = '{0}' AND COLUMN_NAME = '{1}'",
FormatHelper.FormatSqlEscape(tableName),
FormatHelper.FormatSqlEscape(columnName));
}

public override bool ConstraintExists(string schemaName, string tableName, string constraintName)
{
return Exists("SELECT * FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE CONSTRAINT_CATALOG = DB_NAME() AND TABLE_NAME = '{1}' AND CONSTRAINT_NAME = '{2}'",
return Exists("SELECT * FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE CONSTRAINT_CATALOG = DB_NAME() AND TABLE_NAME = '{0}' AND CONSTRAINT_NAME = '{1}'",
FormatHelper.FormatSqlEscape(tableName), FormatHelper.FormatSqlEscape(constraintName));
}

Expand Down

0 comments on commit 5b43130

Please sign in to comment.