hello
i am new in asp.net and in sql
i want to fetch all different data of same id no and this data make addition to each other
how it possible

such as

invoice_no dabit
111 50
111 100
111 20

according to above sql query select * from table name where invoice_no=111

then it fetch all the all in {dr}
i want that my dabit data make addition in particuler variable
string ss= 50+100+20=170
what code i used in c#
plz give me an example..so that i can impliment it in my project......
plz help me......

I could give you query, you find out asp.net syntax to connect it to database and fetch the total column value

select invoice_no, sum(dabit) total from table name where invoice_no=111
group by invoice_no

thanks dear for helping me............

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.