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 / Queries / November 2005

Tip: Looking for answers? Try searching our database.

Pass Through Update Query error (Inner Join)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ILCSP@NETZERO.NET - 21 Nov 2005 22:04 GMT
Hello, I hope someone can help me with this.

I have a SQL 2000 Database with 2 tables, Inventory and Orders.  We use
a Access 2000 database as our front end and I need to update the second
past due date in the Orders table with today's date.  This second
date must be updated only if the first date more than 30 days ago and
if the Inventory entry date is less than 3 months ago.  We do it by
states, so we also have codes for them.  When I run this pass through
query, I get an error telling me that there's an incorrect syntax
near the keyword 'Inner.'  I basically copied the same query we
were using in Access and I deleted most of the parenthesis () there and
hoped it would work, but it does not.  Here's the pass through query
syntax:

UPDATE dbo.Orders INNER JOIN dbo.Inventory ON dbo.Orders.INVID =
dbo.Inventory.INVID SET Orders.PastDueDate2 = Date WHERE
Orders.PastDueDate1 >(Date-30) Inventory.StateCode= 27 AND
Inventory.EntryDate<(Date-120)

Can anyone help me figure this out?  

Thanks.
David S - 21 Nov 2005 22:43 GMT
No idea - just noting that this is a duplicate post of
http://www.accessmonster.com/Uwe/Forum.aspx/access-queries/27110/Pass-Through-Qu
ery-Update-Error-inner-join

[MVP] S.Clark - 21 Nov 2005 23:59 GMT
Try this variation of code.  It makes the link in the WHERE instead of with
the I.J.

UPDATE titles
  SET ytd_sales = titles.ytd_sales + sales.qty
     FROM titles, sales
        WHERE titles.title_id = sales.title_id

Signature

Steve Clark, Access MVP
http://www.fmsinc.com/consulting
*FREE* Access Tips: http://www.fmsinc.com/free/tips.html

> Hello, I hope someone can help me with this.
>
[quoted text clipped - 18 lines]
>
> Thanks.
ILCSP@NETZERO.NET - 22 Nov 2005 16:36 GMT
I'll give it a try Stevie.

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.