Missing something stupid on insert

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ike

    #1

    Missing something stupid on insert

    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 statusactivitie s( 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,r oll) VALUES (6,0,'2006-05-12',0,'D


    CREATE TABLE `statusactiviti es` (
    `id` int(11) NOT NULL auto_increment,
    `status_or_asso ciate_id` int(11) default NULL,
    `status_is_asso ciate` 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,
    `feedbackrequir ed` 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_TIMESTA MP on update
    CURRENT_TIMESTA MP,
    PRIMARY KEY (`id`),
    KEY `status_or_asso ciate_id` (`status_or_ass ociate_id`),
    KEY `status_is_asso ciate` (`status_is_ass ociate`),
    KEY `deleted` (`deleted`),
    KEY `designee` (`designee`)
    )



  • Gordon Burditt

    #2
    Re: Missing something stupid on insert

    >Im wondering if someone can take a look at this simple INSERT statement[color=blue]
    >which is puking on me.[/color]

    MySQL does not support user-defined types of vomit.
    [color=blue]
    >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 statusactivitie s( 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[/color]

    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

    Comment

    • Ike

      #3
      Re: Missing something stupid on insert

      > If you can't find a good reason for the syntax error, suspect that[color=blue]
      > 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[/color]

      Ah yes...that's it exactly. Thanks Gordon. -Ike


      Comment

      Working...