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 |
pharoah35
Yak Posting Veteran
81 Posts |
Posted - 2007-11-13 : 08:24:04
|
Good morning I was hoping someone could lend some assistance concerning this problem. I am trying to update a column in a table. However when I attempt to run it, I get the following error message:"Msg 107, Level 16, State 3, Line 1The column prefix 'dbo.TransNet Corporation_Test$Sales Invoice Header' does not match with a table name or alias name used in the query.Msg 107, Level 16, State 3, Line 1The column prefix 'dbo.TransNet Corporation_Test$Sales Invoice Header' does not match with a table name or alias name used in the query.Msg 107, Level 16, State 3, Line 1The column prefix 'dbo.TransNet Corporation_Test$Sales Invoice Header' does not match with a table name or alias name used in the query."Here is my transact:update dbo.[TransNet Corporation_Test$Sales Commission]set [Cust PO No] = dbo.[TransNet Corporation_Test$Sales Invoice Header].[Customer PO_ No_]where (dbo.[TransNet Corporation_Test$Sales Invoice Header].[No_] = [Inv No])AND(dbo.[TransNet Corporation_Test$Sales Invoice Header].[Posting Date] = [Posting Date])ThanksPharoah35 |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-11-13 : 08:30:48
|
[code]update t1set [Cust PO No] = t2.[Customer PO_ No_]From dbo.[TransNet Corporation_Test$Sales Commission] t1join dbo.[TransNet Corporation_Test$Sales Invoice Header] t2on t2.[No_] = t1.[Inv No]AND t2.[Posting Date] = t1.[Posting Date][/code]Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-11-13 : 08:33:59
|
Tryupdate T set [Cust PO No] = S.[Customer PO_ No_]from dbo.[TransNet Corporation_Test$Sales Commission] T inner join dbo.[TransNet Corporation_Test$Sales Invoice Header] Son S.[No_] = [Inv No])AND S.[Posting Date] = [Posting Date]MadhivananFailing to plan is Planning to fail |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-11-13 : 08:34:30
|
MadhivananFailing to plan is Planning to fail |
|
|
pharoah35
Yak Posting Veteran
81 Posts |
Posted - 2007-11-13 : 08:42:38
|
Hi harsh_athalyeI just wanted to thank you so much for your assistance. This worked wonderfullyThanks againPharoah35 |
|
|
|
|
|