473,385 Members | 1,641 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Missing something stupid on insert

Ike
Im wondering if someone can take a look at this simple INSERT statement
which is puking on me. I KNOW I must have something stupid in it that I am
NOT seeing, which will likely be obvious to someone . I'm enclosing the
statement, the error message, and the table structure. For some reason, this
eludes me. TIA, Ike

INSERT INTO statusactivities( activity, days, custom_date, repeat,
repeat_types, deleted, roll )
VALUES ( 6, 0, '2006-05-12', 0, 'Day(s)', 0, 0 )

#1064 - You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near
'repeat,repeat_types,deleted,roll) VALUES (6,0,'2006-05-12',0,'D
CREATE TABLE `statusactivities` (
`id` int(11) NOT NULL auto_increment,
`status_or_associate_id` int(11) default NULL,
`status_is_associate` int(3) default NULL,
`activity` int(11) NOT NULL default '0',
`days` int(5) NOT NULL default '0',
`type` varchar(60) NOT NULL default '',
`custom_date` varchar(11) default NULL,
`repeat` int(3) default NULL,
`repeat_units` int(5) default NULL,
`repeat_types` varchar(30) default NULL,
`feedbackrequired` int(3) default NULL,
`deleted` int(3) NOT NULL default '0',
`designee` int(11) NOT NULL default '0',
`roll` int(3) default NULL,
`crossid` varchar(30) default NULL,
`tstamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update
CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `status_or_associate_id` (`status_or_associate_id`),
KEY `status_is_associate` (`status_is_associate`),
KEY `deleted` (`deleted`),
KEY `designee` (`designee`)
)

May 12 '06 #1
2 1307
>Im wondering if someone can take a look at this simple INSERT statement
which is puking on me.
MySQL does not support user-defined types of vomit.
I KNOW I must have something stupid in it that I am
NOT seeing, which will likely be obvious to someone . I'm enclosing the
statement, the error message, and the table structure. For some reason, this
eludes me. TIA, Ike

INSERT INTO statusactivities( activity, days, custom_date, repeat,
repeat_types, deleted, roll )
VALUES ( 6, 0, '2006-05-12', 0, 'Day(s)', 0, 0 )

#1064 - You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near
'repeat,repeat_types,deleted,roll) VALUES (6,0,'2006-05-12',0,'D


If you can't find a good reason for the syntax error, suspect that
the column or table name in question is a keyword. Then backquote
it (`repeat`). In this case, `repeat` appears to be a keywoard.

Gordon L. Burditt
May 12 '06 #2
Ike
> If you can't find a good reason for the syntax error, suspect that
the column or table name in question is a keyword. Then backquote
it (`repeat`). In this case, `repeat` appears to be a keywoard.

Gordon L. Burditt


Ah yes...that's it exactly. Thanks Gordon. -Ike
May 12 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: John J. Lee | last post by:
The subject line says it, really: I installed 2.4a2 using the MSI installer on python.org, and I appear to be missing this file: C:\Python24\DLLs\_sre.pyd As a result, Python picks up the...
5
by: Andrew | last post by:
Hi All, Have come across something weird and am after some help. Say i run this query where rec_id is a column of table arlhrl, select * from arlhrl where rec_id >= 14260 This returns to...
16
by: Justin Hoffman | last post by:
This is a question concerning query optimisation. Sorry if it's a bit long, but thanks to anyone who has the patience to help - This is my first post here... If I have two tables:...
77
by: Ville Vainio | last post by:
I tried to clear a list today (which I do rather rarely, considering that just doing l = works most of the time) and was shocked, SHOCKED to notice that there is no clear() method. Dicts have it,...
4
by: Mahesh BS | last post by:
Hello, I need to write a query to find out a set of missing number in a given sequence. Eg : a Column in some table has the following data
2
by: Mangler | last post by:
I am running a stored proc that aborts an insert if the result is "YES" Well all inserts are being aborted and i cant figure out why. Maybe I am missing a line or have something wrong? <CODE>...
3
by: anupamadatta | last post by:
Hi there, I am trying to execute one Insert query using Pro C . the Insert query is as below: Prepared statement is : stmnt.len = sprintf((char*)stmnt.arr, "INSERT INTO %s ("...
5
by: fennychieck | last post by:
dear all, i've a problem here. everytime a user click on "approve" button, they'll always get database error. and when i check the error log, there are several fields that have missing...
2
by: lazukars | last post by:
I have been going over the this code for hours and am baffled. Am I missing something stupid? I am creating dynamic html via innerHTML for a webpage. There is an onClick function in this...
0
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.