Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > SQL Language
|
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 14th, 2010, 07:18 AM
Authorized User
 
Join Date: Sep 2008
Posts: 54
Thanks: 8
Thanked 1 Time in 1 Post
Default How to use 'HAVING' without 'GROUP BY'?

Hi!

'Having' can be used without 'Group by' as well, table has the data but this query is not returning any answers is there anything wrong with this query?

SELECT SUM(ACCOUNT_TYPE)
FROM TBLCUSTCHANNEL
HAVING SUM(ACCOUNT_TYPE) <=10

Please do guide in Oracle and in SQL.

Thanks in advance
 
Old October 14th, 2010, 07:37 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Maybe the account_type sum of values is more than 10?
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========
The Following User Says Thank You to gbianchi For This Useful Post:
arbab (October 15th, 2010)
 
Old October 15th, 2010, 03:28 AM
Authorized User
 
Join Date: Sep 2008
Posts: 54
Thanks: 8
Thanked 1 Time in 1 Post
Thumbs up Simple but very effective answer, good & thanks.

ooooooooo... right u r, Simple but very effective answer, good & thanks.


__________________
How to do programming?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Group Within another Group, xslt1.0 jhansib4u BOOK: XSLT Programmer's Reference, 2nd Edition 4 November 22nd, 2007 01:24 AM
Restart new group number in Group Footer sukarso Crystal Reports 2 October 13th, 2006 12:11 PM
Group by , Sub Group by and Sum mateenmohd SQL Server 2000 1 March 29th, 2005 09:51 AM
Group By btpoole VB Databases Basics 0 February 27th, 2004 11:56 AM
GROUP BY... then sub group? mr.smith Classic ASP Basics 8 November 26th, 2003 09:40 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.