fixed mssql3 groupby/orderby issue, thanks Niphlod.