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)
 strored procedure

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-08-31 : 10:35:44
John writes "I have two simple tables in a database.

SWregister - lists all software against a particular user
field- devicename - contains numerous records
field- hwid - contains no values
field- devicename - contains numerous record


HWregister - lists all hardware against a particular user
field- masterid - contains numerous record
field- pcwnumber - contains numerous record




I want to create a store procedure that will update the SW register with a HWID from the field- masterid where the devicename from both tables match.

I want this because every time that I change one record in HWregister, i have to change multiple records in the SWregister"

blindman
Master Smack Fu Yak Hacker

2365 Posts

Posted - 2006-08-31 : 12:21:20
You don't have devicename in both tables, so how can you match them?
It sounds to me like you either need to implement cascading updates, or you need to normalize your database schema.
Go to Top of Page
   

- Advertisement -