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 |
|
SHIVPREET2K1
Starting Member
32 Posts |
Posted - 2009-04-18 : 02:07:13
|
| Dear all Please tell me whats the problem with following query . its giving me an error. UPDATE Buyer_Dispatches INNER JOIN proformainvoiceforcustom ON Buyer_Dispatches.pi_No = proformainvoiceforcustom.PiNo SET Buyer_Dispatches.Buyer_Code = proformainvoiceforcustom.BuyerCodeWHERE (((Buyer_Dispatches.Buyer_Code) Is Null));The error is:Msg 156, Level 15, State 1, Line 2Incorrect syntax near the keyword 'INNER'.Msg 102, Level 15, State 1, Line 5Incorrect syntax near 'Buyer_Dispatches'.I am not able to understand why this error is coming. Please help its urgent.TksShiv Preet |
|
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
Posted - 2009-04-18 : 02:13:17
|
| UPDATE b SET b.Buyer_Code = p.BuyerCodefrom Buyer_Dispatches b INNER JOIN proformainvoiceforcustom pON Buyer_Dispatches.pi_No = proformainvoiceforcustom.PiNo WHERE b.Buyer_Code Is Null |
 |
|
|
SHIVPREET2K1
Starting Member
32 Posts |
Posted - 2009-04-18 : 02:20:24
|
| yes friend thanks for the help. but this query was working fine in msaccess. I m confused why it behave like that in sql server |
 |
|
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
Posted - 2009-04-18 : 02:26:26
|
| Welcomesyntax:In sql update tablenameset values(columnsname) = newvalues(assgining values)where condition(if requires)further details see booksonline for syntax of insert,update,delete statements |
 |
|
|
|
|
|