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
Sign In
Register
AdSense Revenue
Active Members
Today
Bunty
(130)
Murali
(116)
SweetGhost
(96)
Last 7 Days
amarababu nara...
(1208)
Arun Jacob
(1204)
Pradeep Y
(1170)
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
Sign In
(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
T-SQL's New Features in SQL Server 2005
How to use join in update statement
Setting Identity Value of Our Choice
Useful Stored procedures in SQL Server Part 2
Index Optimization Tips in SqlServer 2005
dotNet Slackers
BizTalk Adaptors
Web Design
budget conference call
Contact Us
Privacy Policy
Terms Of Use