Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server ASP
|
SQL Server ASP Discussions about ASP programming with Microsoft's SQL Server. For more ASP forums, see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server ASP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 31st, 2007, 10:05 AM
Authorized User
 
Join Date: Apr 2006
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Default Trouble with simple JOIN statement

What am I missing here - getting Syntax error near keyword INNER.

UPDATE tblContractorLinkInfo
INNER JOIN CG_Contractors ON tblContractorLinkInfo.CG_ID = CG_Contractors.CG_ID
SET tblContractorsLinkInfo.L_ = CG_Contractors.CG_Notes
WHERE tblContractorLinkInfo.CG_ID = 1019


 
Old May 31st, 2007, 10:09 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Try this

UPDATE tblContractorLinkInfo
SET tblContractorsLinkInfo.L_ = CG_Contractors.CG_Notes
FROM tblContractorLinkInfo
INNER JOIN CG_Contractors ON tblContractorLinkInfo.CG_ID = CG_Contractors.CG_ID
WHERE tblContractorLinkInfo.CG_ID = 1019

The order is like this.... UPDATE, SET, FROM, WHERE...

_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble Using For Next Statement slbibs ASP.NET 2.0 Professional 9 September 19th, 2008 09:44 AM
Can't figure out an OUTER JOIN statement dhsmd SQL Language 5 September 18th, 2008 01:02 AM
PLZ SEND ME THE SIMPLE AND HARD JOIN QUERY RCMDINESH SQL Language 2 September 25th, 2007 03:24 PM
please verify my INNER JOIN statement gilgalbiblewheel Classic ASP Databases 6 April 5th, 2005 07:38 AM
JOIN STATEMENT akibaMaila VB.NET 2002/2003 Basics 5 February 10th, 2005 04:18 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.