Click here to Skip to main content
15,923,168 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Items are comes in Piece and Boxes.

e.g Suppose,

I have purchase 100 piece (tablet) of medicineX.
I have purchase one Box which contain 50 medicineY.

Now item dispense by piece wise only.

Means MedicineX will be given to customer by how much piece they demands one or two or five as per their demands.

Same for MedicineY, I will open the Box of 50 medicine and will give to customer as they demands means 2 , 5 Piece, …etc

Now I required to have a Table in SQL-Server Database.

I have confusion in what are the field should be in table I will create. Please help…thanks……
Posted
Updated 11-Aug-11 23:04pm
v2
Comments
Wendelius 12-Aug-11 5:07am    
As this sounds like homework, what do you have so far?

1 solution

You should need two fields at minimum. One will store medicine name (use varchar)and other field will contain no. of pieces(use int or Bigint) regardless of whether the items come in piece or box.If the items come in box, then just add all the pieces in the box. That's it.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900