How to display non existent data as 0 in Oracle

50 pts.
Tags:
Oracle
Oracle Database
Oracle Forms
Oracle Table
in my table there refno,purchase,sale,acc_type are four columns.i have to sum(b) and sum(c). for a perticular date.but the query should show 0 for clumn b & c where there no value has been entered.suppose purchase,sale, are summing per month.but in some month there is no entry for a,b,c,d.so how to show them for that month as 0 for all columns.?

BUT there is no entry for the month suppose mar or april.then there will be no record for mar or aprilthere is no columns for those months becuse i have not entered any thing for those months.i only entered for sales/purchase

[Br _extended="true" />[Br _extended="true" />plz suggest how i will write.



Software/Hardware used:
oracle

Answer Wiki

Thanks. We'll let you know when a new response is added.

Deb4u, this seems to be the same question as this one (which you posted yesterday):

If you want to provide more details or ask for clarification, please continue the discussion in the same thread.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • rvijaya9
    you can put nvl(<col b>,0) and nvl(<col c>,0) to get 0 in case if no entry is there.this will be applicable only for columns b and c. but if you want entire row should not be displayed then you can put the decode. pls let me know if entire row should be displayed or not.
    50 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following