View Single Post
  #1 (permalink)  
Old July 10th, 2009, 01:18 PM
snufse snufse is offline
Friend of Wrox
Points: 923, Level: 11
Points: 923, Level: 11 Points: 923, Level: 11 Points: 923, Level: 11
Activity: 5%
Activity: 5% Activity: 5% Activity: 5%
 
Join Date: Mar 2007
Location: West Palm Beach, Florida, USA.
Posts: 198
Thanks: 4
Thanked 0 Times in 0 Posts
Question Add up quantities

I need to add gross and net quanties by "load" (which is the bill of lading number). My query still shows multiple rows with same load number (bol number)

Code:
 
select "load",
convert(varchar,Date,101),
branded,
name,
sum(cast(gross as decimal(15,2))), 
sum(cast(net as decimal(15,2)))
from [SFM-TP6000-1].TP6000.dbo.loadcomp as load1
inner join [SFM-TP6000-1].TP6000.dbo.product as prod1 on prod1.product = load1.branded
where load1.branded = 'ULS'

Last edited by snufse : July 10th, 2009 at 01:57 PM.
Reply With Quote