public InsertClause InsertTopInto(Expression top, Table table, params Column[] columns) { var stm = new InsertStatement(this); var clause = new InsertTopIntoTable(stm, top, table, columns); stm.FirstFragment = clause; return(clause); }
public void InsertTopIntoTable(SqlFragment parent, InsertTopIntoTable insertTopIntoTable) { this.Script.Append("INSERT TOP ("); this.Script.AppendFragment(insertTopIntoTable.Top, insertTopIntoTable, this); this.Script.Append(") INTO"); this.Script.AppendFragment(insertTopIntoTable.Table, insertTopIntoTable, this); if (insertTopIntoTable.ColumnList.Any()) { this.Script.Append("("); ExpressionFormatter.FormatColumnList(insertTopIntoTable.ColumnList, insertTopIntoTable, this.Script, this); this.Script.Append(")"); } }