Forums

ASP

This topic is locked

Problems with SELECT SUM statement

Posted 18 Jul 2006 17:56:59
1
has voted
18 Jul 2006 17:56:59 Naveed Liaquat posted:
Hello, This is my first post. I need some help.
I have an access table with a column called 'AmountPaid' and a column called 'datepaid' In my asp page I want it to show the sum of amountpad.
I write a search query
SELECT SUM(amountpaid) as amount
FROM tblCashback

It returns the sum of amount paid.

When I search the database to show the sum of amount paid where the datepaid is a specific date, it returns the values.
However when I do a search for the amount paid for a date that is not in the table, it returns a blank.
I want to replace this with a zero and show it on my asp page.

How can I do this?
I've tried so many different solutions but all were no good.

Naveed Liaquat

Replies

Replied 24 Jul 2006 02:43:52
24 Jul 2006 02:43:52 micah santos replied:
kindly post the codes so we can help you. thanks.

Reply to this topic