SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Wizard dethfire's Avatar
    Join Date
    Aug 2000
    Posts
    2,477
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    sql not ended properly error

    <cfquery name=update datasource=stsweb>
    UPDATE events SET event_title = 'form.title', event_type = 'form.type', event_summary = '#form.summary#' , event_active =

    '#active#', event_admin_notes = '#form.adminnotes#', date_modified = '#now()#' WHERE event_id = #url.id#
    </cfquery>

    Error Executing Database Query.
    [Macromedia][Oracle JDBC Driver][Oracle]ORA-00933: SQL command not properly ended


    Here is what it looks like:
    UPDATE events SET event_title = 'New', event_type = 'event', event_summary = 'Peers has new training classes available' , event_active = 'true', event_admin_notes = 'first attempt ', date_modified = '{ts '2004-09-01 15:38:41'}' WHERE event_id = 1
    Free Science Homework Help
    http://www.physicsforums.com

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,347
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    i bet it's date_modified = '{ts '2004-09-01 15:38:41'}'

    why go to the trouble of asking the database to decode a date string that you construct in coldfusion? why not tell the database to use its own internal current date function?

    so instead of

    ... date_modified = '#now()#'

    you can say

    ... date_modified = sysdate

    this method is also faster
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •