Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / SQL Server / ADP / April 2005

Tip: Looking for answers? Try searching our database.

What's wrong with this stored procedure

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jeff - 28 Apr 2005 16:11 GMT
I get an incorrect syntax error at 'INNER'

CREATE PROCEDURE [SP_UpdateTable] AS
UPDATE TableName INNER JOIN TableName_Audit
ON TableName.[ID] = TableName_Audit.[ID]
SET TableName.[User] = [Allegatiions_Audit].[User],TableName.[Date] =
[Allegatiions_Audit].[Date]
Jeff - 28 Apr 2005 16:14 GMT
Sorry, I typed it incorrectly. Should be:

CREATE PROCEDURE SPUpdateTable AS
UPDATE TableName INNER JOIN TableNameAudit
ON TableName.[ID] = TableNameAudit.[ID]
SET TableName.[User] = TableNameAudit.[User],TableName.[Date] =
TableNameAudit.[Date]
Kevin3NF - 28 Apr 2005 16:34 GMT
Try this:

CREATE PROCEDURE SPUpdateTable
AS
UPDATE TableName
SET TableName.[User] = TableNameAudit.[User],
       TableName.[Date] = TableNameAudit.[Date]
FROM TableName
INNER JOIN TableNameAudit
   ON TableName.[ID] = TableNameAudit.[ID]
Signature

Kevin Hill
President
3NF Consulting

www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.

> Sorry, I typed it incorrectly. Should be:
>
[quoted text clipped - 3 lines]
> SET TableName.[User] = TableNameAudit.[User],TableName.[Date] =
> TableNameAudit.[Date]
Jeff - 28 Apr 2005 17:30 GMT
It works! Thanks,
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.