Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 adding totals in a datagrid

Author  Topic 

sm68506
Starting Member

1 Post

Posted - 2006-06-06 : 23:19:24
I am developing an asp.net 1.1 website using vb.net2003. In this website the client wants to have a column which shows a total of a certain type of car. This is what I have so far:

Database:
ID, car_model, car_color, car_year, total.

I can do the query where it only shows cars of a particular color but am not able to get a total column to work for the total number of cars of that color.

I appreciate any help I can get from this.

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-06-06 : 23:24:53
[code]
select sum(total)
from table
where car_color = 'black'
[/code]


KH

Go to Top of Page
   

- Advertisement -