November 28, 2010 at 11:11 pm
I have a table with two columns.
ITEM QTY
B0-001 100
B0-002 50
B0-003 25
B0-001 40
B0-001 10
B0-005 50
B0-002 60
I need to multiply same item qty and show only one item in the table .. My final answer should
B0-001 = 40000
B0-002 = 3000
B0-003 = 25
B0-005 = 50
How can i multiply values like this
November 28, 2010 at 11:22 pm
OOOPs I Found the solution....
http://mangalpardeshi.blogspot.com/2009/06/multiplying-column-values.html
Thanks
November 28, 2010 at 11:29 pm
you can find something like this
Create Table #table
(
ITEM varchar(10),QTY int
)
Insert into #table
select 'B0-001', 100 union all
select 'B0-002', 50 union all
select 'B0-003', 25 union all
select 'B0-001', 40 union all
select 'B0-001', 10 union all
select 'B0-005', 50 union all
select 'B0-002', 60
select ITEM,POWER(10.0, SUM(LOG10(QTY)))
From #table
group by ITEM
November 28, 2010 at 11:34 pm
sampathsoft (11/28/2010)
OOOPs I Found the solution....http://mangalpardeshi.blogspot.com/2009/06/multiplying-column-values.html
Thanks
Yep you can also look at this url
http://www.eggheadcafe.com/software/aspnet/30291469/function-like-sum-but-multiply.aspx
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply