Home Forums SQL Server 7,2000 T-SQL GROUP BY vs DISTINCT -- SQL SERVER BUG ? RE: GROUP BY vs DISTINCT -- SQL SERVER BUG ?

  • the unexpected results are because you are returning 3 fields in the (from recordset) - these are only grouped by 2 fields, one row for each sr.eid is being returned.

    distinct will include EID in the group and hence the number of rows is less as the duplicate rows are removed.

    MVDBA