Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Alias with compute

Author  Topic 

skweeky
Starting Member

9 Posts

Posted - 2002-02-19 : 09:02:00
hi all from France !!!

is there a way to give an alias for a clause 'compute' like for a column !????
i dont want to see 'cnt' but a more explicit text for the displaying of a result compute

thanks for all !!!

nico

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-02-19 : 09:24:28
COMPUTE modifies the output of a SELECT statement in such a way that it is technically not part of the results. So you really can't put an alias on the COMPUTE output.

Have you tried using ROLLUP or CUBE? Also look at the GROUPING() function. These will generate the output that COMPUTE gives, and GROUPING will help you identify the summary value(s) you want to SELECT. Books Online has details on these.

Go to Top of Page
   

- Advertisement -