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
 Transact-SQL (2000)
 Updating column with sum of columns

Author  Topic 

bass28
Starting Member

4 Posts

Posted - 2004-08-25 : 16:32:11
I have the following in a stored procedure:

UPDATE BM_CostedBOM
SET new_std_cost = (std_labor + std_burden + std_outplant)
WHERE pur_or_mfg = 'M'

The value for new_std_cost is always NULL. Any ideas?

X002548
Not Just a Number

15586 Posts

Posted - 2004-08-25 : 16:39:29
One of your columns is NULL


UPDATE BM_CostedBOM
SET new_std_cost = (ISNULL(std_labor,0) + ISNULL(std_burden,0) + ISNULL(std_outplant,0))
WHERE pur_or_mfg = 'M'




Brett

8-)
Go to Top of Page
   

- Advertisement -