Money Talk's !
Stay Hungry ! Stay Foolish !
Wednesday, February 23, 2011
Show Total in SQL
SELECT distinct(b.fieldname),CONVERT(varchar,SUM(a.fieldname),1) as total
from tablename a, tablename b
where a.fieldname=b.fieldname
group by b.tablename
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment