Oracle error=917 when trying to insert into database

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default Oracle error=917 when trying to insert into database

    I get the following error when I try to insert into table -

    Oracle Error Code = 917

    ORA-00917: missing comma



    SQL = "INSERT INTO ISSCWEB_REQUEST (REQUESTOR_NAME, REQUESTOR_PHONE,
    REQUESTOR_EMAIL, CONTENT_SECTION, CONTENT_OWNER, URL_CHANGE, NEW_CONTENT,
    MODIFY_CONTENT, REMOVE_CONTENT, MODIFY_DATE, CHANGES_REMAIN, REMOVE_CHANGES,
    COMMENTS) VALUES ('Danna Sturdivant', '978/659-3738',
    'Danna.Sturdivant@philips.com', 'WINTEL', 'Mike Conroy',
    'http://www.wwww.wwww.wwww.com', 'Add new content to web site', 'change section
    2 to say - this is modified', 'Remove section 3', '{d '2006-05-01'}', 'No', '{d
    '2006-06-01'}', 'This is a test')"


    Any ideas? :confused;

    <cfparam name="session.isscwebrequest" default="">
    <cfparam name="form.content_section" default="">
    <cfparam name="form.content_section" default="">
    <cfparam name="form.urlchange" default="">
    <cfparam name="form.newcontent" default="">
    <cfparam name="form.modify_content" default="">
    <cfparam name="form.remove_content" default="">
    <cfparam name="form.modify_date" default="">
    <cfparam name="form.changes_remain" default="">
    <cfparam name="form.remove_changes" default="">
    <cfparam name="form.comments" default="">

    <cfset requestor = #session.stcUserInfo.userfname# &' '&
    #session.stcUserInfo.userlname#>

    <!--- can't put cf function is query statement. Setting variables to
    accomodate date values. --->
    <cfset modifydate = #createODBCDate(modify_date)#>

    <cfif remove_changes is not "">
    <cfset removechanges = #createODBCDate(remove_changes)#>
    <cfelse>
    <cfset removechanges = "">
    </cfif>
    <title>ISSC Web Request - Process Page</title>

    <cftransaction>

    <cfquery name="insert_request" datasource="#client.oracledsn#"
    username="#client.oracleuser#" password="#client.oraclepass#">
    INSERT INTO
    ISSCWEB_REQUEST
    (REQUESTOR_NAME,
    REQUESTOR_PHONE,
    REQUESTOR_EMAIL,
    CONTENT_SECTION,
    CONTENT_OWNER,
    URL_CHANGE,
    NEW_CONTENT,
    MODIFY_CONTENT,
    REMOVE_CONTENT,
    MODIFY_DATE,
    CHANGES_REMAIN,
    REMOVE_CHANGES,
    COMMENTS)
    VALUES
    ('#requestor#',
    '#session.stcUserInfo.userphone#',
    '#session.stcUserInfo.useremail#',
    '#content_section#',
    '#contentowner#',
    '#urlchange#',
    '#newcontent#',
    '#modify_content#',
    '#remove_content#',
    '#modifydate#',
    '#changes_remain#',
    '#removechanges#',
    '#comments#')
    </cfquery>



    <CFQUERY name="getRequestID" datasource="#client.oracledsn#"
    username="#client.oracleuser#" password="#client.oraclepass#">
    SELECT MAX(ISSCWEB_ID) as ISSC_ID
    FROM ISSCWEB_REQUEST
    </CFQUERY>

    </cftransaction>

    <!--- send email confirmation --->
    <!--- cc="#form.contentowneremail#" --->
    <cfmail from="Change-Mgmt.PMS-IT@philips.com"
    to="#session.stcUserInfo.useremail#"
    cc="Change-Mgmt.PMS-IT@philips.com"
    bcc="infrastructure.admin@philips.com"
    subject="ISSC Web Content Change Request - #getRequestID.ISSCID# --
    TESTING"
    type="HTML">

    This is the confirmation for your request <strong>REQUEST ID</strong>.<br><br>
    For status updates, please <strong>REPLY TO ALL</strong> on this request.<br>
    <hr>
    <br>


    #session.isscwebrequest#

    </cfmail>

    <!--- end send email --->

    <!--- go to confirmation page --->
    <cflocation url="isscweb_confirm.cfm?requestid=#getrequestid.i sscid#"
    addtoken="no">

    QueenBee Guest

  2. Similar Questions and Discussions

    1. Database Insert Error
      :confused; I am inserting data into three tables, and the insert statements have a similar format but I get an error saying that I am Missing...
    2. Insert to Access database error*** Please Help
      When trying to insert into access database with a form created by the standard MX2004 Insert and form wizard, get the "Syntax " error as below. Line...
    3. Insert into database error
      I get the following error when I load this page. ODBC Error Code = 37000 (Syntax error or access violation) Missing semicolon (;) at end of SQL...
    4. How to INSERT XML data into Oracle database
      Hi, Working on a solution where we are using XML as a means to export and import various data. Are Using ADO to save to (export ) XML using...
    5. Dump Database / Porting Database to Oracle
      Hi, I do not know much about informix. I have no running instance here, but its my job to transfer data from informix to oracle. - Is there a...
  3. #2

    Default Re: Oracle error=917 when trying to insert into database

    You have a comment that states <!--- can't put cf function is query
    statement.... Why not? I do it all of the time. Also, I don't think that you
    want to enclose your date values in single quotes.

    Phil

    paross1 Guest

  4. #3

    Default Re: Oracle error=917 when trying to insert into database

    I was having other errors, that's why i have the variables set at the top. I
    removed the quotes from the dates. Now I get the following error:

    ORA-00911: invalid character



    SQL = "INSERT INTO ISSCWEB_REQUEST (REQUESTOR_NAME, REQUESTOR_PHONE,
    REQUESTOR_EMAIL, CONTENT_SECTION, CONTENT_OWNER, URL_CHANGE, NEW_CONTENT,
    MODIFY_CONTENT, REMOVE_CONTENT, MODIFY_DATE, CHANGES_REMAIN, REMOVE_CHANGES,
    COMMENTS) VALUES ('Danna Sturdivant', '978/659-3738',
    'Danna.Sturdivant@philips.com', 'EUC', 'Dan Lawrence', 'l;kjlkjsxdljl',
    'aosidufpu', 'apsiofdau', 'apsdifao', {d '2006-04-01'}, 'No', {d '2006-06-01'},
    'eraspdiursae')"



    <cfquery name="insert_request" datasource="#client.oracledsn#"
    username="#client.oracleuser#" password="#client.oraclepass#">
    INSERT INTO
    ISSCWEB_REQUEST
    (REQUESTOR_NAME,
    REQUESTOR_PHONE,
    REQUESTOR_EMAIL,
    CONTENT_SECTION,
    CONTENT_OWNER,
    URL_CHANGE,
    NEW_CONTENT,
    MODIFY_CONTENT,
    REMOVE_CONTENT,
    MODIFY_DATE,
    CHANGES_REMAIN,
    REMOVE_CHANGES,
    COMMENTS)
    VALUES
    ('#requestor#',
    '#session.stcUserInfo.userphone#',
    '#session.stcUserInfo.useremail#',
    '#content_section#',
    '#contentowner#',
    '#urlchange#',
    '#newcontent#',
    '#modify_content#',
    '#remove_content#',
    #createODBCDate(modify_date)#,
    '#changes_remain#',
    #createODBCDate(remove_changes)#,
    '#comments#')
    </cfquery>

    QueenBee Guest

  5. #4

    Default Re: Oracle error=917 when trying to insert into database

    Nothing is obviously wrong. My suggestion is to comment out all the fields
    except the first one and try to run it. Then un-comment the fields one at a
    time until it crashes. Then you'll at least know what field it was.

    Dan Bracuk Guest

  6. #5

    Default Re: Oracle error=917 when trying to insert into database

    I've narrowed it down to the date fields that is doesn't like. Everything else will insert just fine.

    Any other ideas?

    QueenBee Guest

  7. #6

    Default Re: Oracle error=917 when trying to insert into database

    It depends on your exact Driver/Oracle Version/Connection environment and I
    haven't done it in many years, but I do recall updating dates succesfully with
    DD-MMM-YY syntax and no quotes. Oracle seemed to like that just fine. I'd
    give about an 80% chance that SET myDate = 35-JUL-06 will work for you.

    JMGibson3 Guest

  8. #7

    Default Re: Oracle error=917 when trying to insert into database

    1) If I put #dateformat(modify_date,'dd-mmm-yy')# - I get error :
    Oracle Error Code = 984

    ORA-00984: column not allowed here



    SQL = "INSERT INTO ISSCWEB_REQUEST (REQUESTOR_NAME, REQUESTOR_PHONE,
    REQUESTOR_EMAIL, CONTENT_SECTION, CONTENT_OWNER, URL_CHANGE, NEW_CONTENT,
    MODIFY_CONTENT, REMOVE_CONTENT, MODIFY_DATE, CHANGES_REMAIN, COMMENTS,
    ISSCWEB_ID) VALUES ('Danna Sturdivant', '978/659-3738',
    'Danna.Sturdivant@philips.com', 'EUC', 'Dan Lawrence', 'l;kjlkjsxdljl',
    'aosidufpu', 'apsiofdau', 'apsdifao', 01-Apr-06, 'No', 'eraspdiursae',
    ISSC_WEB_SEQ.Nextval)"

    2) If I put #createODBCDate(modify_date)# - I get:
    ORA-00911: invalid character



    SQL = "INSERT INTO ISSCWEB_REQUEST (REQUESTOR_NAME, REQUESTOR_PHONE,
    REQUESTOR_EMAIL, CONTENT_SECTION, CONTENT_OWNER, URL_CHANGE, NEW_CONTENT,
    MODIFY_CONTENT, REMOVE_CONTENT, MODIFY_DATE, CHANGES_REMAIN, COMMENTS,
    ISSCWEB_ID) VALUES ('Danna Sturdivant', '978/659-3738',
    'Danna.Sturdivant@philips.com', 'EUC', 'Dan Lawrence', 'l;kjlkjsxdljl',
    'aosidufpu', 'apsiofdau', 'apsdifao', {d '2006-04-01'}, 'No', 'eraspdiursae',
    ISSC_WEB_SEQ.Nextval)"





    QueenBee Guest

  9. #8

    Default Re: Oracle error=917 when trying to insert into database

    I fixed the problem - instead of using CreateODBCDate(modify_date), I used
    '#dateformat(modify_date,'dd-mmm-yyyy')# -- this is using the format that
    ORACLE likes and that solved the issue.

    Thanks to all who responded!

    QueenBee Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139