Forums: [SOLVED] Syntax error (missing operator) in query expression - Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

[SOLVED] Syntax error (missing operator) in query expression Update Statement 7.0 build 9948 Rate Topic: -----

#1 User is offline   John 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 538
  • Joined: 02-December 05

Posted 18 February 2012 - 05:50 AM

Problem with update statement again .

Asprunner 7.0 build 9948.

The following statement syntax okay in event software .

Server error ; see below. Can't see anything wrong with this????

sql="update Customers set posbal= " & values("poscost") & " * " & values("posqty") & " Where Customer ID = " & values("fldcut_num") & " "

All Numeric Fields.

Error Message :
Microsoft JET Database Engine error '80040e14'

Syntax error (missing operator) in query expression 'Customer ID = 700056699'.

/cdi/output3/include/dal.asp, line 230


On Print Returns:

update Customers set posbal= 2 * 15 Where Customer ID = 700056699
Which Seems Perfect????????????

Any Ideas .
0

#2 User is offline   admin 

  • Administrator
  • PipPipPip
  • Group: Admin
  • Posts: 16045
  • Joined: 03-February 03

Posted 18 February 2012 - 03:25 PM

The space between Customer and ID is the problem. If your database is MS Access use
[Customer ID]=...

Best regards,
Sergey Kornilov
0

#3 User is offline   John 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 538
  • Joined: 02-December 05

Posted 25 February 2012 - 09:51 PM

View Postadmin, on 18 February 2012 - 10:25 AM, said:

The space between Customer and ID is the problem. If your database is MS Access use
[Customer ID]=...

It was easier to change the fields to text when using a space in the field name . Learned a lesson here easier to not use space in database.
Thanks admin.
Solved with brackets and change back to text field. and adding

sql="update Customers set posbal=posbal + (" & values("poscost") & " * " & values("posqty")& ") Where [Customer ID] IN (Select [Customer ID] from Customers where [Customer ID] = '" & values("fldcut_num") & "')"
0

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked