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
 General SQL Server Forums
 New to SQL Server Programming
 problem-Adding numeric values in the database

Author  Topic 

feejaz
Yak Posting Veteran

68 Posts

Posted - 2007-12-15 : 06:44:03
i have a table in the below shown format

Values Items.......................................................TABLE1

Customer1 20 Fuses

Customer2 30 Screws

Customer3 40 Fuses

Customer1 45 Fuses

Customer3 78 Batteries

Customer1 40 Screws

now i want to add the values of screw of customer1 and insert in a table in one field as shown below

Screws Fuses Screws .................................TABLE2

Customer1 65 (total of above) 115 40

Custoerm2 ------------------------------------

NOW ADD VALUES IN THE ABOVE WAY AND INSERT IN THE TABLE 2


Thanks


Navi

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2007-12-15 : 07:32:57
>> screw of customer1

do you work for the phone company?




elsasoft.org
Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2007-12-15 : 12:58:49
The first thing I would do is split the items in table 1 , from what I can see, you've got : Values = Customer1 Items = 20 Fuses
nce you'vr split them into 3 colums , with maybe the third column called "ItemType" which could have a foreign Key to a ItemType table
Could you explain what the 115 represents?

Jack Vamvas
--------------------
Search IT jobs from multiple sources- http://www.ITjobfeed.com
Go to Top of Page
   

- Advertisement -