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 |
|
maevr
Posting Yak Master
169 Posts |
Posted - 2008-01-18 : 06:51:49
|
| I have at table that I want to update using another table which contains other values than those in the text column.table1id: text:1 1111, 2222, 33332 1234, 22223 0123table2id: str:1111 aaaa2222 bbbb3333 cccc1234 qqqq0123 ooooI want to replace the text in table1 with the new values so that it looks like below:table1id: text:1 aaaa, bbbb, cccc2 qqqq, bbbb3 ooooMy first idea was to split the text column in table1 and insert every new text with its id in a temporary table and then concaternate a new string and update the column.But how do I manage this? |
|
|
raaj
Posting Yak Master
129 Posts |
Posted - 2008-01-18 : 08:58:18
|
| is thr any other common field between table1 and table2??? |
 |
|
|
maevr
Posting Yak Master
169 Posts |
Posted - 2008-01-20 : 16:14:40
|
| Thanks for your reply!No, there is no other values.How can I split the string in the text column so that all strings (except the comma) can be placed as a new row in a temporary table? |
 |
|
|
jackv
Master Smack Fu Yak Hacker
2179 Posts |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-01-21 : 08:51:24
|
| Also read about normalizationMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|