Rollup

Hi,

I have a table in a particular order which I ned to maintain.when I say select a,b, from tab group by a,b,c with rollup the order of the output is changed.How can I avoid this.

thanks,
ssm

[201 byte] By [SSM] at [2008-2-6]
# 1
GROUPING and ROLLUP may not preserve order. You will need to add an ORDER BY clause to your query.
CliffordDibble at 2007-9-9 > top of Msdn Tech,SQL Server,Transact-SQL...

SQL Server

Site Classified