problem in my programme [Resolved]

Posted by Nuwan under ASP.NET on 6/15/2012 | Points: 10 | Views : 1652 | Status : [Member] | Replies : 2
dear all

I have a sql table account_Detail. It has data like below,


date credit Debit

5/1/2012 1000.00 800.00
5/1/2012 2000.00 1000.00
5/2/2012 5000.00 1000.00
5/2/2012 800.00 1000.00
5/2/2012 2000.00 4000.00
5/3/2012 1000.00 1000.00



I want to write a programme(web or windows), it display record like below.

Date Sum(credit) Sum(debit)

5/1/2012 3000.00 1800.00
5/2/2012 7800.00 6000.00
5/3/2012 1000.00 1000.00


how I do that, Please help me.

Rathnayake


Responses

Posted by: Siva524 on: 6/15/2012 [Member] Starter | Points: 25

Up
0
Down
first of all you need to write sql query.in that query you have to provide date .
if you provide date then the query get the data (credit and debit).use sum() function
that's enough

select debit,credit from table name where date="5/12/2012" .
and also sum(credit) where date =" date here"
also sum(credit) where date="date here"

select debit,credit ,sum(credit),sum(debit) from table name where="5/12/2012".


Nuwan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Nuwan on: 6/18/2012 [Member] Starter | Points: 25

Up
0
Down
Its work. Thanks CGN007.

Rathnayake

Nuwan, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response