dhumphreys / cfrel

ColdFusion Relational Algebra Framework
16 stars 5 forks source link

Confirm SqlServer behavior for DISTINCT paged queries #46

Open dhumphreys opened 12 years ago

dhumphreys commented 12 years ago

I can't remember why, but the SqlServer paging requires that any DISTINCT query have a GROUP BY that matches the SELECT clause. In cases where an aggregate sub-select is a column in the SELECT clause, the query will blow up since you cannot have aggregates in a GROUP BY. This needs to be confirmed as valid.

See https://github.com/dhumphreys/cfrel/blob/develop/src/visitors/SqlServer.cfc#L30.