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)
 Tracking Inventory Stock

Author  Topic 

aturner
Starting Member

29 Posts

Posted - 2004-06-07 : 11:35:36
I need to create a stored procedure that will calculate the total inventory in stock, based on 13% that will be allocated to each department. For example, there are 32000 pencils in stock at 144 in a box equally 20 boxes. I want to allocate only 5 boxes to one department and maybe 8 boxes to another department. Question 1: How do I write a stored procedure that can handle percentage, multiplication and subtraction? And Question 2, what datatype is used in a table that will allow you to handle percentage?

tran008
Starting Member

38 Posts

Posted - 2004-06-07 : 11:51:12
take a look at this [url]http://www.sqlteam.com/item.asp?ItemID=16480[/url]
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2004-06-07 : 12:00:51
What school are you attending?

Do you have any tables designed or do you need to do that as part of the exercise?



Brett

8-)
Go to Top of Page

aturner
Starting Member

29 Posts

Posted - 2004-06-09 : 11:55:40
The table has been created and currently has two fields: ItemID (int) and QtyOnHand (int). There are no other fields included in the table as specified by their request. Hopefully, this will help.
Go to Top of Page
   

- Advertisement -