C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !






SQL Server Compute and Compute By Clause


Posted Date: 22 Jun 2008    Resource Type: Articles    Category: Databases

Posted By: Bunty       Member Level: Diamond
Rating:     Points: 10



Hi,

The rules regarding the use of the COMPUTE and COMPUTE BY clauses are listed below:

1>The DISTINCT keyword cannot be used with the aggregate functions.

2>All columns referred to in the COMPUTE clause must appear in the SELECT column list.

3>The ORDER BY clause must be used whenever the COMPUTE BY clause is used.

4>The ORDER BY clause can be eliminated only when the COMPUTE clause is used.

5>The columns listed in the COMPUTE BY clause must match the columns used in the ORDER BY clause.

6>More than one COMPUTE clause can be used in the SELECT statement to produce a result with subtotals and a grand total.

7>The different aggregate functions can be used on more than one column with the COMPUTE BY clause.





Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Difference B/W Truncate,Delete and Drop Table
Previous Resource: Differences between User Defined Function and Stored Procedures in SQL Server
Return to Discussion Resource Index
Post New Resource
Category: Databases


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

budget conference call

Contact Us    Privacy Policy    Terms Of Use