Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

oracle sql - case statement and count  RSS feed

 
Avi Sridhar
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All friendly people

I have 2 tables table1 and table2

table 1 and table 2 have got ids.

my condition is ,

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

This is what i have done so far.



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


Thanks,
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 36875
481
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What happens when you run the code you posted - error message, unexpected result, etc?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!