This error plagues my SQL and as the error is so generic and comprises multiple lines, I have nothing to search on.
I can correct it only to have an "Syntax error in UPDATE statement."
So, sample
Error begins at TRUE and ends before the WHERE. -
UPDATE [Inspections SHELL]
-
SET [Inspections SHELL].[Phase 1] = TRUE -- Toggle Yes/No on
-
INNER JOIN [Inspections Attempt]
-
ON ([Inspections SHELL].[Field] = [Inspections Attempt].[Field])
-
AND ([Inspections SHELL].[start] = [Inspections Attempt].[date])
-
WHERE ([Inspections Attempt].[Phase] = 1);
-
This is a reduction of the following code -
UPDATE [Inspections SHELL]
-
SET [Inspections SHELL].[Phase 1] = IIf([Inspections Attempt]![Phase]=1,True,False), --Toggle Phase 1 if Phase = 1
-
[Inspections SHELL].[Phase 2] = IIf([Inspections Attempt]![Phase]=2,True,False), --Toggle Phase 2 if Phase = 2
-
[Inspections SHELL].[18X Day] = IIf([Inspections Attempt]![Phase]=0,True,False), --Toggle 180 day if Phase = 0
-
/* Toggle appropriate state if note indicates */
-
[Inspections Shell].[Acceptence] = IIF(instr([Inspections Shell].[Notes], "Accept") > 0, true, false),
-
[Inspections Shell].[Special] = IIF(instr([Inspections Shell].[Notes], "Spec") > 0, true, false),
-
[Inspections Shell].[CC] = IIF(instr([Inspections Shell].[Notes], "CC") > 0, true, false) ,
-
[Inspections Shell].[90 Day] = IIF(instr([Inspections Shell].[Notes], "90") > 0, true, false),
-
[Inspections Shell].[1 Year] = IIF(instr([Inspections Shell].[Notes], "1 year") > 0, true, false),
-
[Inspections Shell].[2 Year] = IIF(instr([Inspections Shell].[Notes], "2 year") > 0, true, false),
-
[Inspections Shell].[W&B] = IIF(instr([Inspections Shell].[Notes], "&") > 0, true, false)
-
FROM [Inspection SHELL]
-
INNER JOIN [Inspections Attempt]
-
ON ([Inspections SHELL].[Field] = [Inspections Attempt].[Field])
-
AND ([Inspections SHELL].[start] = [Inspections Attempt].[date]);
-
-
Which has the same series of errors.
-
As a supplement, most update queries that I get to "work" will explode my database (going from 7 MB to 200 MB with a creation of 20,000+ null records). The only update that has worked has used bare minimum syntax, so the actual question may be "what am I missing with update syntax?"
4 2686
Try a change in Syntax, specifically the location of the SET Statement, as in: - UPDATE [Inspections SHELL]
-
INNER JOIN [Inspections Attempt]
-
ON ([Inspections SHELL].[Field] = [Inspections Attempt].[Field])
-
AND ([Inspections SHELL].[start] = [Inspections Attempt].[date])
-
SET [Inspections SHELL].[Phase 1] = True
-
WHERE [Inspections Attempt].[Phase] = 1;
That gets rid of the syntax problem... now to test it; but hat is supremely annoying, I found the relocation of the join in a forum but I got an error in UPDATE.
Will this method work for the mass update?
EDIT:
It doesn't join properly.
Each table has identical fields being inner joined, but I'm only getting 65 records returned of 312, and none of them have [Phase 1] = True.
@Jeff - Can you Upload a Copy of the Database with a Minimal number of Records, stripped of any Personal Info, of course? This way, we can see the problem first hand.
I'll see what I can do.
Going to have to use an update query to scramble some of the data to enforce privacy. -
UPDATE table
-
SET table.Field = Right([table]![Field],1) & Mid([table]![Field],2,2) & Left([table![Field], 3);
-
Should change all records such that ABCD would become DBCABC right? Because it's not doing -anything-, and I cannot submit it with the current fields as is, and they have to be all updated in the same format to preserve data relationship.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: alexz |
last post by:
valuA = (request.form("toadd"))
If valuA = "" then
SQL = "UPDATE CourseReg SET attended='Active' WHERE ID
IN("&request.form("toadd")&")"
Set RS = MyConn.Execute(SQL)
End If
MyConn.Close
Set...
|
by: shank |
last post by:
1) I'm getting this error: Syntax error (missing operator) in query
expression on the below statement. Can I get some advice.
2) I searched ASPFAQ and came up blank. Where can find the "rules"...
|
by: dcarson |
last post by:
I've read about this error in several other discussions, but still
can't seem to pinpoint the problem with my code. Everything seemed to
be working fine for some time, but it now tends to bomb out...
|
by: Lumpierbritches |
last post by:
Syntax Error (missing operator) in query expression =BLANK'S
MOLLIE-PRINCE BRUISER-3/14/2004-03
AnimalID is correct. I'm trying to open with a command button or double click
the frmAnimal from a...
|
by: khan |
last post by:
getting, error, 3075
Syntax Error (Missing Operator) in query expression '8WHERE
.=1'
Dim TotalQty As Integer
TotalQty = DLookup("", "", "=" &
Forms!!)
|
by: Justin R |
last post by:
Hey I am really stuck and can't figure out what is wrong here is the code line and surrounding code, if anyone can help i would appreciate it. Thanks
This first line is the line that has a problem...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |