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.
| Author |
Topic |
|
helixpoint
Constraint Violating Yak Guru
291 Posts |
Posted - 2007-03-26 : 07:22:19
|
| I have 2 tables. I am trying to normalize table 1. I have 2 fields in table 1 fundID and fundName I pulled all the distinct values out of the fundName column and put them in table 2. Now I have to put the id's from table 2 into the fundID field in table 1. Who do I do this |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-03-26 : 07:30:58
|
| What is the criteria to assign IDs to the fund names?Post some sample data and expected output.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
helixpoint
Constraint Violating Yak Guru
291 Posts |
Posted - 2007-03-26 : 07:47:22
|
| I figured it outUPDATE BIT_HARDWARESET FUND_ID = (SELECT FUND_ID FROM BIT_FUND WHERE (FUND_DESC = BIT_HARDWARE.FUND)) |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-03-26 : 08:32:10
|
You mean this?UPDATE hSET h.FUND_ID = f.FUND_IDFROM BIT_HARDWARE AS hINNER JOIN BIT_FUND AS f ON f.FUND_DESC = h.FUND Peter LarssonHelsingborg, Sweden |
 |
|
|
|
|
|