This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Oracle/OAS and the fly likes sum() as not seperate column Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "sum() as not seperate column" Watch "sum() as not seperate column" New topic
Author

sum() as not seperate column

indu iyengar
Ranch Hand

Joined: Jul 30, 2010
Posts: 115
Hi

am trying to list the students whose creditPoints are < 50 by joining 2 tables.
Here am getting sum(creditPoints)<50 as seperate column ( as 0 for condition - notsatisfied rows, 1 for condition - satisfied rows )

Here I need to display the students who satisfy the condition.
is there any way to avoid seperate column and to display the condition satisfied rows only?

please help me , I strucked at this frm morning onwards any help would be highly appreciated
thanks
indu

thanks ,
Indu
Jorn Hansen
Greenhorn

Joined: Dec 13, 2006
Posts: 4
Hi Indu

Please consider trying a HAVING-clause:



/Jorn


/Jorn Hansen, mainly Oracle Developer
indu iyengar
Ranch Hand

Joined: Jul 30, 2010
Posts: 115
thaks Jorn it worked like a charm...

thanks
indu
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: sum() as not seperate column
 
Similar Threads
Need a conditional Statement
org.hibernate.NonUniqueObjectException
passing values from checkbox to javascript
org.hibernate.PropertyAccessException
Multi dimensional arrays