Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie - End of Statement error

Status
Not open for further replies.

SmokeyJoe

Programmer
Nov 13, 2000
80
US
I am trying to update a MySQL database. The update syntax is shown below.



UPDATE [LOW_PRIORITY] [IGNORE] tbl_name
SET col_name1=expr1 [, col_name2=expr2, ...]
[WHERE where_definition]

It would appear that a command such as:

Update Generic SET LName = "Jones"
or
Update Generic Set City = "New York" Where GenericID = RecID

should work. However, I get an "Expected End of Statement" Error. How do I correct this type of error?

Thanks in Advance

SmokeyJoe
 


When you have a field that isnt numeric such as an auto id you need to put single quotes around it.

Code:
Update Generic Set City = "'New York'" Where GenericID = RecID
www.vzio.com
ASP WEB DEVELOPMENT



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top