You just need to rewrite the query, here is an example from SQL BOL

CREATE TABLE s (ColA INT, ColB DECIMAL(10,3))
GO
CREATE TABLE t (ColA INT PRIMARY KEY, ColB DECIMAL(10,3))
GO
INSERT INTO s VALUES(1, 10.0)
INSERT INTO s VALUES(1, 20.0)
INSERT INTO t VALUES(1, 0.0)
GO

UPDATE t 
SET t.ColB = t.ColB + s.ColB
FROM t INNER JOIN s ON (t.ColA = s.ColA)
GO

So your code should look something like 

UPDATE NewProduct np
SET np.details = op.details
FROM np INNER JOIN op ON np.dealerpartno  = op.dealerpartno

Have not tested, just written it here based upon the example, hope it helps.


-----Original Message-----
From: Andy Matthews [mailto:[EMAIL PROTECTED] 
Sent: 20 October 2005 14:17
To: CF-Talk
Subject: RE: WHAT'S WRONG WITH THIS QUERY?

I was always under the impression that you couldn't join tables in anything
other than a SELECT query.

<!----------------//------
andy matthews
web developer
ICGLink, Inc.
[EMAIL PROTECTED]
615.370.1530 x737
--------------//--------->

-----Original Message-----
From: Nomad [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 19, 2005 6:04 PM
To: CF-Talk
Subject: WHAT'S WRONG WITH THIS QUERY?


Hello,

This query works fine with Access.

With SQL server it creates an error.

Here's the query:

UPDATE NewProduct INNER JOIN OldProduct ON NewProduct.dealerpartno  =
OldProduct.dealerpartno SET NewProduct.details = OldProduct.details


Much appreciate any help in debuging.

Thanks in advance.

Ben





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:221634
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to