Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

oracle sql - case statement and count

 
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: 34837
369
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic