• 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
Sheriff
Posts: 36027
431
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?
 
These are not the droids you are looking for. Perhaps I can interest you in a tiny ad?
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!