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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 SQL Update Procedure

Author  Topic 

greentech
Starting Member

1 Post

Posted - 2004-09-03 : 08:42:13
I would realy be grateful if somebody could help me with this problem. I shouldn't be too difficult

I have this UPDATE procedure
---------------------------------------------------------
CREATE PROCEDURE p_product_packaging_upd
@printer_id int,
@weight decimal,
@lweight int,
@items int

/*WITH ENCRYPTION*/ AS

UPDATE kovinska_paleta_siri
SET lweight =lweight -@weight ,qitems =qitems -1 WHERE printe_id=@printer_id
GO
---------------------------------------------------------------
The procedure should take the product weightÿyou input into the form and substract it from the total weight of the packaging. Instead it substracts the wieght of the product from the total wieght of the packaging(@weight). The weight of the individual products I put in the text box are saved in another table - products_weights - so it should substract the weight in that table or the weight that I input in to the text box.

So my question is - how should I change my update procedure that it would do wgat I want it to do.

I hope I made my problem clear enough,

Thanks!!

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2004-09-03 : 08:47:26
give us the DDL for the relevent tables....product, product_weights....sample input data (relevent insert statements would help big)....and matching expected results....

it'll move you to a solution faster.
Go to Top of Page
   

- Advertisement -