Viewing 4 posts - 1 through 4 (of 4 total)
Koen Verbeeck (6/5/2014)
June 5, 2014 at 6:37 am
Koen Verbeeck (6/5/2014)
nkweke (6/5/2014)
Thanks again Koen, I am new here and still trying to grasp this sql stuff. Your suggestions are noted.
I added the Group By and it pops up...
June 5, 2014 at 6:04 am
Koen Verbeeck (6/5/2014)
you need to add a group by clause.
DECLARE @Amount MONEY;
DECLARE @totAmn MONEY;
SELECT ISNULL(SUM(p.price*s.quantity)+ s.shippingcost,0)
FROMtbl_shoppingcarts
INNER JOINtbl_productp ON s.productid =p.productid
WHERE s.cartid =@cartid
GROUP BY s.shippingcost;
Try...
June 5, 2014 at 3:41 am
Many thanks for your concern. Here is what I have done; but is flagging up error:
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[GetTotalAmount]
(@cartid char(36))
AS
BEGIN
declare @Amount money
declare @totAmn money
select isnull(sum(tbl_product.price*tbl_shoppingcart.quantity)+ tbl_shoppingcart.shippingcost,0)...
June 5, 2014 at 3:12 am
Viewing 4 posts - 1 through 4 (of 4 total)