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 |
|
Zath
Constraint Violating Yak Guru
298 Posts |
Posted - 2009-09-09 : 09:39:05
|
| I have the following information in TBL2: 68 69 71 72 74 75 68 76 80 79 82 81 84 83the first column refers to TBL1 - it's primary keyThe second is a column in TBL1 that needs to be updated.So, update TBL1 SET colX = 69 WHERE colPK = 68I have done this before but just can't remember or find where.Thanks,Zath |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-09-09 : 09:41:08
|
| What is your expected result?MadhivananFailing to plan is Planning to fail |
 |
|
|
Zath
Constraint Violating Yak Guru
298 Posts |
Posted - 2009-09-09 : 09:46:58
|
| Just trying to update one table from another table.Been looking at this but just can't seem to get it working...http://msdn.microsoft.com/en-us/library/aa260662(SQL.80).aspx |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-09-09 : 09:57:25
|
| But your query specifies that you want to update on the same tableWhat have you tried?MadhivananFailing to plan is Planning to fail |
 |
|
|
Zath
Constraint Violating Yak Guru
298 Posts |
Posted - 2009-09-09 : 10:06:56
|
| worded what I needed wrong.I got it working. Had the wrong column name in the query LOL..... |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-09-10 : 02:29:38
|
quote: Originally posted by Zath worded what I needed wrong.I got it working. Had the wrong column name in the query LOL.....
Post the workable queryMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|