Esempio n. 1
0
 public void SelectDistinctTopPercent <T>(SqlFragment parent, SelectDistinctTopPercent <T> selectDistinctTopPercent) where T : IStatement
 {
     this.Script.Append("SELECT DISTINCT TOP (");
     this.Script.AppendFragment(selectDistinctTopPercent.Percent, parent, this);
     this.Script.Append(") PERCENT");
     ExpressionFormatter.FormatExpressionList(selectDistinctTopPercent.ColumnList, parent, this.Script, this);
 }
Esempio n. 2
0
        public SelectDistinctTopPercent <SelectStatement> SelectDistinctTopPercent(
            Expression percent,
            Expression expression,
            params Expression[] expressions)
        {
            var statement = new SelectStatement(this);
            var clause    = new SelectDistinctTopPercent <SelectStatement>(
                statement,
                percent,
                Collection <Expression> .From(expression, expressions));

            statement.FirstFragment = clause;
            return(clause);
        }