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 |
|
NeilG
Aged Yak Warrior
530 Posts |
Posted - 2009-10-07 : 09:35:08
|
| Can anyone help I can't see what is wrong with this UPDATE Newsletter_testSET PathName = SELECT replace(InfFilePath,'Srvone','SRVtwo') FROM insightNewsletterFiles_test--------------------------SQL Server MCP & MCTS |
|
|
Sachin.Nand
2937 Posts |
Posted - 2009-10-07 : 09:40:29
|
| UPDATE T1 SET T1.PathName =REPLACE(T2.InfFilePath,'Srvone','SRVtwo') FROM Newsletter_test T1INNER JOIN insightNewsletterFiles_test T2 ON T1.someid=T2.someidPBUH |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-10-07 : 09:44:33
|
quote: Originally posted by NeilG Can anyone help I can't see what is wrong with this UPDATE Newsletter_testSET PathName = SELECT replace(InfFilePath,'Srvone','SRVtwo') FROM insightNewsletterFiles_test--------------------------SQL Server MCP & MCTS
So, you meant there were no relations between the tables?MadhivananFailing to plan is Planning to fail |
 |
|
|
NeilG
Aged Yak Warrior
530 Posts |
Posted - 2009-10-07 : 09:46:08
|
| No there wasn't |
 |
|
|
NeilG
Aged Yak Warrior
530 Posts |
Posted - 2009-10-07 : 09:46:22
|
| isn't sorry |
 |
|
|
Sachin.Nand
2937 Posts |
Posted - 2009-10-07 : 09:52:23
|
| Then maybe u will hv to sth lk thisUPDATE T1 SET T1.PathName =REPLACE(T2.InfFilePath,'Srvone','SRVtwo') FROM Newsletter_test T1INNER JOIN insightNewsletterFiles_test T2 ON T1.PathName<>'Why my life sucks???'I hope u dont hv path named that.PBUH |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-10-07 : 10:01:20
|
| UPDATE Newsletter_testSET PathName = (SELECT replace(InfFilePath,'Srvone','SRVtwo') FROM insightNewsletterFiles_test)MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|