Why "Syntax error in UPDATE statement" error ? 
Author Message
 Why "Syntax error in UPDATE statement" error ?

The sql query I have is:

UPDATE Kund SET Namn='Nisse', Banknr='12345',
Kontonr='54321', Adress='Nissev', Postnr=12345,
Ort='Nisseborg', Vxl=True, Best=False, Inl=False
WHERE Kundnr=12345

And in the Access database
Namn, Banknr, Kontonr, Adress, Ort is of type Text
Postnr, Kundnr is of type Number
Vxl, Best, Inl is of type Yes/No

When I'm running this query i get "Syntax error in UPDATE
statement" error. What is wrong?



Mon, 12 Sep 2005 08:14:56 GMT  
 Why "Syntax error in UPDATE statement" error ?
Have you tried running this under the MS Access application?

The SQL looks OK to me. I'm not an expert on Microsoft SQL but the only bits
that I can think might potentially cause a problem are the Yes/No/True/False
bits.

Try omitting the Yes/No bits & see if that works - then you can narrow down
the problem

E.g
UPDATE Kund SET Namn='Nisse', Banknr='12345',
Kontonr='54321', Adress='Nissev', Postnr=12345,
Ort='Nisseborg'
WHERE Kundnr=12345

If that doesn't work, try starting small and build the query up until it
fails:

UPDATE Kund SET Namn='Nisse' WHERE Kundnr=12345

Also, Depending on whether you are  usign DAO/ADO etc, you should be able to
get more information than just plain "Syntax Error".

Hope this helps

Regards,
Neil


Quote:
> The sql query I have is:

> UPDATE Kund SET Namn='Nisse', Banknr='12345',
> Kontonr='54321', Adress='Nissev', Postnr=12345,
> Ort='Nisseborg', Vxl=True, Best=False, Inl=False
> WHERE Kundnr=12345

> And in the Access database
> Namn, Banknr, Kontonr, Adress, Ort is of type Text
> Postnr, Kundnr is of type Number
> Vxl, Best, Inl is of type Yes/No

> When I'm running this query i get "Syntax error in UPDATE
> statement" error. What is wrong?



Mon, 12 Sep 2005 11:57:29 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Why "Syntax error in UPDATE statement" error?

2. internal compiler error with "using" statement

3. Q: Error message "Multiple rows updated"???

4. ODBC: "Multiple rows were updated" ERROR

5. Error "free"-ing "malloc"-ed memory

6. Compile error "Internal error during SetupPhase"

7. SQL Statement Syntax Error.

8. urlmon.idl(523) : error MIDL2025 : syntax error : expecting a type specification near "DWORD"

9. *STRANGE* error MIDL2025 : syntax error : expecting ] or , near "QUEUEABLE"

10. error MIDL2025 : syntax error : expecting a type specification near "IXMLElement"

11. Wrong DAO error: "Syntax error in number in query expression"

12. Error when "==" is in data

 

 
Powered by phpBB® Forum Software