File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes oracle sql - case statement and count Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "oracle sql - case statement and count" Watch "oracle sql - case statement and count" New topic

oracle sql - case statement and count

Avi Sridhar
Ranch Hand

Joined: May 31, 2007
Posts: 42
Hi All friendly people

I have 2 tables table1 and table2

table 1 and table 2 have got ids.

my condition is ,

if then i will need the count on the table2 ids, else if is not present in then for the the count should be 0.

This is what i have done so far.

I am not able to figure it out. Please help.

Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 32819

What happens when you run the code you posted - error message, unexpected result, etc?

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: oracle sql - case statement and count
It's not a secret anymore!