By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,834 Members | 2,265 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,834 IT Pros & Developers. It's quick & easy.

selecting information from two tables (problem)

P: n/a
What I am trying to do is select all the rows out of the categories
table (see below) and select the sum of j_amount out of the judgment
table. Right now it is only returning the categories that are in the
judgment table. I want it to return those fields with the amounts out
of the judgment table, but also the all the other categories from the
categories table with 0 as there amount. Does anyone have a

select ca_code,ca_desc,sum(j_amount) as sum_amt,ca_dis_cycle
from categories LEFT OUTER JOIN judgment ON
where j_case_no='45698'
and j_party_no=1
group by ca_code,ca_desc,ca_dis_cycle
Nov 12 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.