473,883 Members | 1,585 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SQL UPDATE INNER JOIN syntax

91 New Member
I have the following syntax for Update Inner Join:

Expand|Select|Wrap|Line Numbers
  1. UPDATE RuleDetail 
  2.  
  3. SET RuleDetail.Function_involved = MasterUpload.Function_involved 
  4.  
  5. FROM RuleDetail
  6.  
  7. INNER JOIN MasterUpload 
  8.  
  9. ON RuleDetail.Rule_description = MasterUpload.Rule_description
However, when I am trying to run it, I am getting an error message -

"Syntax error (missing operator)in query expression 'MasterUpload.F unction_involve d

FROM RuleDetail

INNER JOIN MasterUpload

ON RuleDetail.Rule _description = MasterUpload.Ru le_description' ."

Could you please advise where I am going wrong here?

Thanks,
SG
Mar 21 '12
20 19507
NeoPa
32,584 Recognized Expert Moderator MVP
sg2808:
I guess, because Process.Process ID field is a autonumber field.
You can believe it. If, as you say, Process.Process ID is an AutoNumber field, then it certainly could not be updated.

sg2808:
When I run the SQL with the change as above, I get this message - "You are about to update 0 row(s)....".
The SQL is fine, but I suspect there is something else awry with what you've told us. Recent posts have started to indicate a consistent situation that makes sense. Unfortunately, this indicates it's not a completely accurate representation of your real position. SOmething is not right, but I'm afraid I can't tell you what that is as I don't have the information from you with which to determine what that might be. All I can say is that there appear to be no records selected which match the criteria specified. Hopefully, that will be enough to get you looking in the right direction at least.
Mar 26 '12 #21

Sign in to post your reply or Sign up for a free account.

Similar topics

0
2747
by: Richard | last post by:
Hi, I work on a VB6 software using ADO to connect to Oracle 9.2i. When I create a recordset based on a query containing a "inner join" clause (sql server syntax, the software connects also to sql server and the "inner join" syntax must be preserved for a large fraction of the queries), AddNew and Update methods fail.
3
59086
by: indabert | last post by:
Hello, I have two tables (table1 and table2). I want to set a flag in table1 for each common row with table2. I use the following syntax UPDATE table1 SET flag='Y' from table1 INNER JOIN table2 on (table1.a = table2.a) AND (table1.b = table2.b) However the situation arises where I may have a row in table2 that matches with two or more rows in table1. The requirement is that I only want to set the flag on a single row in table1.
4
12586
by: meyvn77 | last post by:
Im using an ADP to connect to a SQL Sqever DB. In access it was really easy to say Inner join on table1 and table2 and update columnA from table1 with columnC from table2 where table1.key = table2.key and table2 columnB = 1 and table2 columnD = 4 I have tried all manner of beasts to get this thing to work..
10
10548
by: deko | last post by:
I've tried each of the below, but no luck. UPDATE tblEntity As tbl INNER JOIN search3220 As qry ON tbl.Entity_ID = qry.Entity_ID SET tbl.Cat_ID = 289; UPDATE tblEntity INNER JOIN search3220 ON tblEntity.Entity_ID = seach3220.Entity_ID SET tblEntity.Cat_ID = 289; The only issue I can imagine aside from syntax is that Entity_ID is not unique in the query. tblEntity will only have one Entity_ID of 1700, for
6
9327
by: dmonroe | last post by:
hi group -- Im having a nested inner join problem with an Access SQl statement/Query design. Im running the query from ASP and not usng the access interface at all. Here's the tables: tblEmployees empId -- EmpName -- EmpRole -- EmpManager -------....------------.... ---------....--------------- 1........ dan yella..........1..........2
52
6375
by: MP | last post by:
Hi trying to begin to learn database using vb6, ado/adox, mdb format, sql (not using access...just mdb format via ado) i need to group the values of multiple fields - get their possible variations(combination of fields), - then act on each group in some way ...eg ProcessRs (oRs as RecordSet)... the following query will get me the distinct groups
12
3944
by: info | last post by:
The following query works fine in access and does exactly what I want it to do however I get a syntax error when I port it over to SQL Server 2000. ------------- UPDATE OrdersProducts INNER JOIN Products ON OrdersProducts.ProductID = Products.ProductID SET Products.Stock = Products.Stock-OrdersProducts.Quantity WHERE OrdersProducts.OrderID=63116
12
13195
by: Chamnap | last post by:
Hello, everyone I have one question about the standard join and inner join, which one is faster and more reliable? Can you recommend me to use? Please, explain me... Thanks Chamnap
11
19978
by: YZXIA | last post by:
Is there any difference between explicit inner join and implicit inner join Example of an explicit inner join: SELECT * FROM employee INNER JOIN department ON employee.DepartmentID = department.DepartmentID
1
2617
maxamis4
by: maxamis4 | last post by:
I have the following query that I am trying to carry over from ms access to ms sql server. I keep getting a msg 156, level 15, state 1, line 2 Incorrect syntax near the keyword "INNER". it works in ms access and I am not sure why its not working on this side. UPDATE dbo.cr_stat INNER JOIN (dbo.call_req INNER JOIN dbo.z_tbl_D_26_Time_To_Resolve_CR ON dbo.call_req.persid = dbo.z_tbl_D_26_Time_To_Resolve_CR.CR_Persid) ON ...
0
9933
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
9781
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11121
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10734
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10836
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10407
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5982
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4210
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3230
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.