Syntax eror in INSERT INTO satement

I get this when i try to insert information in the database:
[Macromedia][SequeLink JDBC Driver][ODBC
Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error in
INSERT INTO statement.
thanks for the help in advanced

Epid3mik
> I get this when i try to insert information in the
database:
I suspect some of your column names are reserved keywords,
such as FROM, TIME, etcetera.
http://support.microsoft.com/kb/286335
Whenever possible, avoid using keywords as object names. The
better solution here is to permanently rename the columns that are
keywords. Assuming the rest of your query syntax is correct, that
should fix the syntax error. If for some reason you cannot rename
the columns, you must escape them by using square brackets around
the column names:
INSERT INTO Message ( mem_id, [From], [Time], .... )
As an aside, you should properly scope your variables.
Example use #FORM.mem_id# instead of just #mem_id#. Your should
also consider using cfqueryparam for all query values. These last
two things are not the cause of your error, but they are good
coding practices.

Similar Messages

  • Syntax error in insert into

    Hi,
    I'm new to coldfusion and was doing a practice survey. I'm
    getting the following error:
    The INSERT INTO statement contains the following unknown
    field name: 'recipes'. Make sure you have typed
    the name correctly, and try the operation again.
    The error occurred in (coldfusion form): line 405
    403 :
    (lname,fname,yourID,status,preprog_survey,recipes,activity,tips,stress,other,othertext,we ight_result,lbs_gained,lbs_lost,behaviors,desc_behaviors,most_help,improve_prog)
    404 : values
    405 :
    ('#lname#','#fname#','#yourID#','#status#','#preprog_survey#','#recipes#','#activity#','# tips#','#stress#','#other#','#othertext#','#weight_result#','#lbs_gained#','#lbs_lost#','# behaviors#','#desc_behaviors#','#most_help#','#improve_prog#')
    406 : </cfquery>
    407 :
    SQL Insert into maintaint
    (lname,fname,yourID,status,preprog_survey,recipes,activity,tips,stress,other,othertext,we ight_result,lbs_gained,lbs_lost,behaviors,desc_behaviors,most_help,improve_prog)
    values ('last name','first
    name','444444','member,'No','0','0','1','0','1','no work, all
    play','gained',' too many','','Yes','Dreaming of eating better, but
    not doing it','This survey!','no improvement suggestions'
    VENDORERRORCODE -3502
    SQLSTATE 42000
    Can anyone tell me what this possibly means? I'm sure its
    probably hard to understand without seeing the form. These are the
    types of fields each are:
    lname, fname, yourID = text
    status = radio
    preprog_survey = radio
    recipes, activity,tips, stress, other, = checkboxes
    othertext, = text
    weight_result, = radio
    lbs_gained,lbs_lost, = text
    behaviors, = radio
    desc_behaviors, most_help, improve_prog = text

    Looking at the code you supplied I noticed that for the
    checkboxes values where '0' and '1'.
    SQL Insert into maintaint
    (lname,fname,yourID,status,preprog_survey,recipes,activity,tips,stress,other,othertext,we ight_result,lbs_gained,lbs_lost,behaviors,desc_behaviors,most_help,improve_prog)
    values ('last name','first
    name','444444','member,'No','0','0','1','0','1','no work, all
    play','gained',' too many','','Yes','Dreaming of eating better, but
    not doing it','This survey!','no improvement suggestions'
    You don't need quotes around numeric values, only text.
    Hope that helps you.

  • Error while inserting into ms access using jsp

    i am using the following code to insert values from textboxes into access database
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con = DriverManager.getConnection(url);
              Statement stmt=con.createStatement();
              //ResultSet rs = null;
              //String sql = ("INSERT INTO co-ords VALUES ('" + nam + "','" + lat + "','" + lon + "','"+ latm +"','"+ lonm +"','"+ latmd +"','"+ lonmd +"','"+ latms +"','"+ lonms +"') ");
              String sql = "INSERT INTO co-ords (nam ,lat , lon , latm ,lonm , latmd , lonmd ,latms , lonms) VALUES ('" + nam + "','" + lat + "','" + lon + "','"+ latm +"','"+ lonm +"','"+ latmd +"','"+ lonmd +"','"+ latms +"','"+ lonms +"') ";
              out.println(sql);
              stmt.executeUpdate(sql);
    the output i get is
    INSERT INTO co-ords (nam ,lat , lon , latm ,lonm , latmd , lonmd ,latms , lonms) VALUES ('cck','28.656529681148545','77.23440170288086','28','77','39','14','23.508','3.8472') Exception:java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
    can somebody help me?

    Simple,
    Some error in your query right. Unable to understand Quotation stuff.
    Well understand it properly else error will follow forever :)
    Without String, Straight Away Values
    stmt1.executeUpdate("insert into Login_Details values('Example','Exmaple')");This is the query with Login_Id Pass_Word String containing the value
    stmt1.executeUpdate("insert into Login_Details values('"+Login_Id+"','"+Pass_Word+"')");Then storing sql as string and pass it in executeUpdate(sql)
    String sql="insert into Login_Details values ('example','example') "String + Values in String
    String sql="insert into Login_Details values ('"+example+"','"+example+"') "Just first it . Hope this reply solve ur SQL EXCEPTIONG
    Sachin Kokcha

  • Syntax error in insert query

    I have a flash form that is used to inserts a record into an
    Access database table. In the for there are 4 datefields, several
    text input fields, and several select fields. When I submit the
    form, I get a syntax error that reads:
    Executing Database Query. [Macromedia][SequeLink JDBC
    Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver]
    Syntax error in INSERT INTO statement.
    The error occurred on line 184. Complex object types cannot
    be converted to simple values.
    Line 184 is the last line of the Values in the insert query.
    The query looks like this:
    <CFQUERY DATASOURCE="#REQUEST.DataSource#">
    INSERT INTO EstimateNumber(
    BidNumber,
    Project,
    JobSite,
    EstimatedBy,
    Region,
    Company,
    Division,
    InquiryNumber,
    SafetyChecklist,
    SafetyChecklistDate,
    QCChecklist,
    QCChecklistDate,
    EstimatedValue,
    UserUsername,
    UserPassword,
    Updated,
    ReviewDate,
    ReviewedBy,
    Discipline,
    BidDate,
    JobNumber,
    UpdatedBy
    VALUES(
    #FORM.BidNumber#,
    '#FORM.Project#',
    '#FORM.JobSite#',
    '#FORM.EstimatedBy#',
    #FORM.Region#,
    #FORM.Company#,
    #FORM.Division#,
    '#FORM.InquiryNumber#',
    #FORM.SafetyChecklist#,
    #FORM.SafetyChecklistDate#,
    #FORM.QCChecklist#,
    '#FORM.QCChecklistDate#',
    #FORM.EstimatedValue#,
    '#FORM.UserUsername#',
    '#FORM.UserPassword#',
    #FORM.Updated#,
    #FORM.ReviewDate#,
    #FORM.ReviewedBy#,
    #FORM.Discipline#,
    #FORM.BidDate#,
    #FORM.JobNumber#,
    '#FORM.UpdatedBy#'
    </CFQUERY>
    Any recomendations?

    Date/Time in Access provide some pretty strage hurdles. In
    many occassions I have simply changed the field to a Text field and
    ran with that and never seemed to have problems with the result. I
    didn't like doing it but I never received errors. I have been
    receiving some parameter errors with <cfqueryparam> like the
    database doesn't recognized the preceding declared field in the
    update or insert query. Here is an example of a wierd error with
    Access. I have 2 tables. One is for estimate numbers and the other
    is for sub estimate numbers that can be assigned to specific
    estimate numbers. If is actually a complicated explanation about
    what is taking place behind the doors on this. The concept is
    simple on the surface. Both tables have the same fields except the
    subestimate table has 1 extra for a user defined subestimate
    number. The only relation between the two will be the estimate
    number. This insert works fine.
    INSERT INTO EstimateNumber(
    BidNumber,
    Project,
    JobSite,
    EstimatedBy,
    Region,
    Company,
    Division,
    InquiryNumber,
    SafetyChecklist,
    SafetyChecklistDate,
    QCChecklist,
    QCChecklistDate,
    EstimatedValue,
    UserUsername,
    UserPassword,
    ReviewDate,
    Discipline,
    BidDate,
    JobNumber,
    UpdatedBy
    VALUES(
    #FORM.BidNumber#,
    '#FORM.Project#',
    '#FORM.JobSite#',
    '#FORM.EstimatedBy#',
    #FORM.Region#,
    #FORM.Company#,
    #FORM.Division#,
    '#FORM.InquiryNumber#',
    #FORM.SafetyChecklist#,
    <cfqueryparam
    value="#FORM.SafetyChecklistDate#"
    cfsqltype="CF_SQL_DATE "
    maxlength="50"
    >,
    #FORM.QCChecklist#,
    <cfqueryparam
    value="#FORM.QCChecklistDate#"
    cfsqltype="CF_SQL_DATE "
    maxlength="50"
    >,
    #FORM.EstimatedValue#,
    '#FORM.UserUsername#',
    '#FORM.UserPassword#',
    <cfqueryparam
    value="#FORM.ReviewDate#"
    cfsqltype="CF_SQL_DATE "
    maxlength="50"
    >,
    #FORM.Discipline#,
    <cfqueryparam
    value="#FORM.BidDate#"
    cfsqltype="CF_SQL_DATE "
    maxlength="50"
    >,
    #FORM.JobNumber#,
    '#FORM.UpdatedBy#'
    This next one is the same exact query with the same table
    setup with one added field but kicks back a parmeter error
    expecting 4. I can't explain it.
    INSERT INTO SubEstimate(SubBidNumber,
    BidNumber,
    Project,
    JobSite,
    EstimatedBy,
    Region,
    Company,
    Division,
    InquiryNumber,
    SafetyChecklist,
    SafetyChecklistDate,
    QCChecklist,
    QCChecklistDate,
    EstimatedValue,
    UserUsername,
    UserPassword,
    ReviewDate,
    Discipline,
    BidDate,
    JobNumber,
    UpdatedBy
    VALUES(#FORM.SubBidNumber#,
    #FORM.BidNumber#,
    '#FORM.Project#',
    '#FORM.JobSite#',
    '#FORM.EstimatedBy#',
    #FORM.Region#,
    #FORM.Company#,
    #FORM.Division#,
    '#FORM.InquiryNumber#',
    #FORM.SafetyChecklist#,
    <cfqueryparam
    value="#FORM.SafetyChecklistDate#"
    cfsqltype="CF_SQL_DATE "
    maxlength="50"
    >,
    #FORM.QCChecklist#,
    <cfqueryparam
    value="#FORM.QCChecklistDate#"
    cfsqltype="CF_SQL_DATE "
    maxlength="50"
    >,
    #FORM.EstimatedValue#,
    '#FORM.UserUsername#',
    '#FORM.UserPassword#',
    <cfqueryparam
    value="#FORM.ReviewDate#"
    cfsqltype="CF_SQL_DATE "
    maxlength="50"
    >,
    #FORM.Discipline#,
    <cfqueryparam
    value="#FORM.BidDate#"
    cfsqltype="CF_SQL_DATE "
    maxlength="50"
    >,
    #FORM.JobNumber#,
    '#FORM.UpdatedBy#'
    IF I get rid of the cfqueryparam fields it works. If I simply
    remove the param, I get a Syntax error. Needless to say I commented
    this query for the sake of sanity for the time being.

  • Inserting into MsAccess Database

    Hi,
    I am having problem with inserting a row into the MsAccess Database. I am getting error like
    "SQLException: Occurred while performing Database Operations ---> method Main() java.sql.SQLException
    : [Microsoft][ODBC Microsoft Access 97 Driver] Syntax error in INSERT INTO statement.[Microsoft][ODB
    C Microsoft Access 97 Driver] Syntax error in INSERT INTO statement".
    My code is as under:
    please help me out.
    Smitha
    ==========================================
    package dao;
    import utils.GeneralFailureException;
    import dbConnection.dbConnection;
    import java.util.*;
    import java.sql.*;
    public class GeneralExpenses {
    dbConnection dbCon = new dbConnection();
    public GeneralExpenses() {
         super();
    public static java.sql.Timestamp getTstamp() {
    java.util.Date date = (Calendar.getInstance()).getTime();
    java.sql.Timestamp tStamp = new java.sql.Timestamp(date.getTime());
    System.out.println("The Time Stamp : " + tStamp);
    return tStamp;
    public void insertExpenseTable(String sExphead, double dAmount, String sMode)
         throws GeneralFailureException, SQLException, ClassNotFoundException {
         String inssql = "INSERT INTO EXPENSES(tnum, date , " + sExphead + ", " + sMode + ") VALUES(?,?,?,?)";
         Connection conn = null;
         PreparedStatement pstmt = null;
         try {
              conn = dbCon.getConnection();
              pstmt = conn.prepareStatement(inssql);
              pstmt.setInt(1, 100);
              pstmt.setTimestamp(2, getTstamp());
              pstmt.setDouble(3, dAmount);
              pstmt.setString(4, sMode);
              pstmt.executeUpdate();
         } finally {
              dbCon.closeAll(pstmt, conn);
    public static void main(String[] args) {
         try {
    GeneralExpenses ge = new GeneralExpenses();
         ge.insertExpenseTable("xxxxxxx", 250.35, "yyyyyyyy");
         System.out.println("worked");
         } catch(ClassNotFoundException sqlex) {
         System.err.print("SQLException: Occurred while performing Database Operations ---> method Main() " + sqlex);
         System.err.println(sqlex.getMessage());
         catch(SQLException sqlex) {
         System.err.print("SQLException: Occurred while performing Database Operations ---> method Main() " + sqlex);
         System.err.println(sqlex.getMessage());
    } catch(GeneralFailureException e) {
         System.err.print("GeneralFailureException: Occurred while Establishing Connection ---> method getConnection() " + e);
         System.err.println(e.getMessage());
    } catch(Exception e) {
         System.err.print("GeneralFailureException: Occurred while Establishing Connection ---> method getConnection() " + e);
         System.err.println(e.getMessage());

    I'm so happy to finally found the answer of my problem with that message Kurt.
    Thank you very much... !
    I will now remember that date cannot be the name of a field when using jdbc-odbc. I called my field TransDate and it is now working perfectly!

  • Syntax error in INSERT STATEMENT

    A problem on the date part of the query but why I don´t
    know, Thanks for any pointers,
    TIA
    <cfquery name="update1" datasource="trevor_SecurityDB">
    INSERT INTO imagesproducts
    (title, info, date)
    VALUES ( '#form.title#', '#form.info#', '#DateFormat(Now())#'
    </cfquery>
    Error Occurred While Processing Request
    Error Executing Database Query.
    [Macromedia][SequeLink JDBC Driver][ODBC
    Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error in
    INSERT INTO statement.
    The error occurred in uploadmember.cfm: line 28
    26 : INSERT INTO imagesproducts
    27 : (title, info, date)
    28 : VALUES ( '#form.title#', '#form.info#',
    '#DateFormat(Now())#' )
    29 : </cfquery>
    30 :
    SQL INSERT INTO imagesproducts (title, info, date) VALUES (
    'News test', 'Testing news info', '12-Jul-07' )
    DATASOURCE trevor_SecurityDB
    VENDORERRORCODE -3502
    SQLSTATE 42000

    Perhaps it is a reserved word issue with the date column,
    since
    date is an ODBC Reserved Keyword. You might try enclosing it
    within brackets [ ].
    <cfquery name="update1" datasource="trevor_SecurityDB">
    INSERT INTO imagesproducts
    (title, info, [date])
    VALUES ( '#form.title#', '#form.info#', '#DateFormat(Now())#'
    </cfquery>
    Or, if that doesn't help, you might try using a cfqueryparam
    tag for the '#DateFormat(Now())#' value using a cfsqltype =
    "CF_SQL_TIMESTAMP" (assuming a date/time datatype on the column).
    Also, you might look into using one of the CreateODBCDateTime() or
    CreateODBCDate() functions.
    Phil

  • Problem inserting record using INSERT INTO

    I am an amateur web builder using some ColdFusion functionality to access information on an Access database. I know very little about ColdFusion syntax, but I'm using Dreamweaver CS3 to help generate most of the code. I'm working on an insert record page to create a user database with login information. I'm not sure what the problem is, but I'm getting a syntax error referencing this particular portion of the code:
    Syntax error in INSERT INTO statement.
    The error occurred in C:\ColdFusion9\wwwroot\Everett\register.cfm: line 22
    Below is the entire page with line 22 (referenced in the error message) in red. Any ideas?
    <cfset CurrentPage=GetFileFromPath(GetBaseTemplatePath())>
    <cfif IsDefined("FORM.MM_InsertRecord") AND FORM.MM_InsertRecord EQ "register">
      <cfquery datasource="everettweb">  
        INSERT INTO Users ([First Name], [Last Name], [Email Address], Password)
    VALUES (<cfif IsDefined("FORM.first_name") AND #FORM.first_name# NEQ "">
    <cfqueryparam value="#FORM.first_name#" cfsqltype="cf_sql_clob" maxlength="255">
    <cfelse>
    </cfif>
    , <cfif IsDefined("FORM.last_name") AND #FORM.last_name# NEQ "">
    <cfqueryparam value="#FORM.last_name#" cfsqltype="cf_sql_clob" maxlength="255">
    <cfelse>
    </cfif>
    , <cfif IsDefined("FORM.email") AND #FORM.email# NEQ "">
    <cfqueryparam value="#FORM.email#" cfsqltype="cf_sql_clob" maxlength="255">
    <cfelse>
    </cfif>
    , <cfif IsDefined("FORM.password") AND #FORM.password# NEQ "">
    <cfqueryparam value="#FORM.password#" cfsqltype="cf_sql_clob" maxlength="255">
    <cfelse>
    </cfif>
      </cfquery>
      <cflocation url="register_success.cfm">
    </cfif>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/Main.dwt" codeOutsideHTMLIsLocked="false" -->
    <head>
    <link href="main.css" rel="stylesheet" type="text/css" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!-- InstanceBeginEditable name="doctitle" -->
    <title>Everett Music Department, Everett, MA</title>
    <!-- InstanceEndEditable -->
    <style type="text/css">
    <!--
    body {
    background-color: #660000;
    -->
    </style>
    <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    //-->
    </script>
    <!-- InstanceBeginEditable name="head" -->
    <script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
    <script src="SpryAssets/SpryValidationConfirm.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryValidationConfirm.css" rel="stylesheet" type="text/css" />
    <!-- InstanceEndEditable -->
    <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    <!--
    a:link {
    color: #660000;
    a:visited {
    color: #A01D22;
    a:hover {
    color: #FFCC00;
    -->
    </style>
    <link href="main.css" rel="stylesheet" type="text/css" />
    </head>
    <body onload="MM_preloadImages('menu_about_over','menu_ensembles_over.jpg','menu_schools_over.j pg','menu_events_over.jpg','menu_faculty_over.jpg','menu_contacts_over.jpg','menu_home_ove r.jpg','menu_about_over.jpg','menu_links_over.jpg','menu_login_over.jpg')">
    <table width="960" align="center" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td colspan="3"><img src="top_border.jpg" width="960" height="20" align="top" /></td>
      </tr>
      <tr align="center">
        <td colspan="3"><a href="index.php"><img src="e_oval_top.jpg" height="100" width="270" border="0" /></a><a href="index.php"><img src="header.jpg" height="100" width="690" border="0" /></a></td>
      </tr>
      <tr>
        <td height="35" width="301"><a href="index.php"><img src="e_oval_bottom.jpg" height="35" width="234" border="0" /></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('home','','menu_home_over.jpg',1)"><img src="menu_home.jpg" width="67" height="35" name="home" border="0" id="home" /></a></td>
        <td width="251"><ul id="MenuBar1" class="MenuBarHorizontal">
          <li><a class="MenuBarItemSubmenu" href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('about','','menu_about_over.jpg',1)"><img src="menu_about.jpg" width="71" height="35" name="about" border="0" id="about" /></a>
            <ul>
              <li><a href="#">News</a></li>
              <li><a href="#">History</a></li>
              <li><a href="#">Media</a></li>
            </ul>
          </li>
          <li><a class="MenuBarHorizontal" href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('ensembles','','menu_ensembles_over.jpg',1)"><img src="menu_ensembles.jpg" width="98" height="35" name="ensembles" border="0" id="ensembles" /></a>
            <ul>
              <li><a href="#">Band</a></li>
              <li><a href="#">Chorus</a></li>
              <li><a href="#">Strings</a></li>
            </ul>
          </li>
          <li><a class="MenuBarItemSubmenu" href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('schools','','menu_schools_over.jpg',1)"><img src="menu_schools.jpg" width="82" height="35" name="schools" border="0" id="schools" /></a>
            <ul>
              <li><a href="#">Everett High School</a></li>
              <li><a href="#">English School</a></li>
              <li><a href="#">Keverian School</a></li>
              <li><a href="#">Lafayette School</a></li>
              <li><a href="#">Parlin School</a></li>
              <li><a href="#">Webster School</a></li>
              <li><a href="#">Whittier School</a></li>
            </ul>
          </li>
        </ul>
        </td>
               <td width="408"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('events','','menu_events_over.jpg',1)"><img src="menu_events.jpg" width="74" height="35" name="events" border="0" id="events" /></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('faculty','','menu_faculty_over.jpg',1)"><img src="menu_faculty.jpg" width="79" height="35" name="faculty" border="0" id="faculty" /></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('links','','menu_links_over.jpg',1)"><img src="menu_links.jpg" width="66" height="35" name="links" border="0" id="links" /></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('login','','menu_login_over.jpg',1)"><img src="menu_login.jpg" name="login" width="69" height="35" border="0" id="login" /></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('contact','','menu_contact_over.jpg',1)"><img src="menu_contact.jpg" width="100" height="35" name="contact" border="0" id="contact" /></a><img src="menu_spacer_end.jpg" width="20" height="35" /></td>
      </tr>
      <tr height="10">
        <td colspan="3"><img src="menu_bottom_spacer.jpg" height="10" width="960" /></td>
      </tr>
    </table>
    <table width="960" cellpadding="0" cellspacing="0" align="center">
      <tr height="50">
        <td width="30" background="left_border.jpg"><img src="clear.gif" width="30" height="50" /></td>
        <td width="900" bgcolor="#FFFFFF">
          <table width="900" cellpadding="0" cellspacing="0">
            <tr>
              <td width="900" height="350" valign="top"><!-- InstanceBeginEditable name="PageBody" -->
          <form action="<cfoutput>#CurrentPage#</cfoutput>" method="POST" name="register" preloader="no" id="register">
                <table width="100%">
                  <tr>
                    <td colspan="2" class="heading1">Fill in the information below to register for this site:</td>
                  </tr>
                  <tr>
                    <td colspan="2"><img src="clear.gif" height="15" /></td>
                  </tr>
                  <tr>
                    <td width="50%" class="form" align="right">First Name:</td>
                    <td width="50%"><span id="sprytextfield1">
                      <input type="text" name="first_name" required="yes" id="first_name" width="150" typeahead="no" showautosuggestloadingicon="true" />
                      <span class="textfieldRequiredMsg">A value is required.</span></span></td>
                  </tr>
                  <tr>
                    <td class="form" align="right">Last Name:</td>
                    <td><span id="sprytextfield2">
                      <input type="text" name="last_name" required="yes" id="last_name" width="150" typeahead="no" showautosuggestloadingicon="true" />
                      <span class="textfieldRequiredMsg">A value is required.</span></span></td>
                  </tr>
                  <tr>
                    <td class="form" align="right">Email Address:</td>
                    <td><span id="sprytextfield3">
                    <input type="text" name="email" validate="email" required="yes" id="email" width="150" typeahead="no" showautosuggestloadingicon="true" />
                    <span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td>
                  </tr>
                  <tr>
                    <td class="form" align="right">Confirm Email Address:</td>
                    <td><span id="sprytextfield4"><span id="ConfirmWidget">
                    <input type="text" name="email_confirm" validate="email" required="yes" id="email_confirm" width="150" typeahead="no" showautosuggestloadingicon="true" />
                    <span class="confirmInvalidMsg">The values do not match</span></span></span></td>
                  </tr>
                  <tr>
                    <td class="form" align="right">Password:</td>
                    <td><span id="sprytextfield5">
                      <input type="password" name="password" required="yes" id="password" width="150" />
                      <span class="textfieldRequiredMsg">A value is required.</span></span></td>
                  </tr>
                  <tr>
                    <td class="form" align="right">Confirm Password:</td>
                    <td><span id="sprytextfield6"><span id="ConfirmWidget">
                      <input type="password" name="password_confirm" required="yes" id="password_confirm" width="150" />
                      <span class="confirmInvalidMsg">The values do not match</span></span></span></td>
                  </tr>
                  <tr>
                    <td> </td>
                    <td><input name="submit" type="submit" id="submit" value="Register" /></td>
                  </tr>
                </table>
          <input type="hidden" name="MM_InsertRecord" value="register" />
          </form>
          <script type="text/javascript">
    <!--
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");
    var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2");
    var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "email");
    var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4", "email");
    var sprytextfield5 = new Spry.Widget.ValidationTextField("sprytextfield5");
    var sprytextfield6 = new Spry.Widget.ValidationTextField("sprytextfield6");
    //-->
    </script>
    <script type="text/javascript">
    var ConfirmWidgetObject = new Spry.Widget.ValidationConfirm("sprytextfield4", "email");
    var ConfirmWidgetObject = new Spry.Widget.ValidationConfirm("sprytextfield6", "password");
    </script>
              <!-- InstanceEndEditable --></td>
            </tr>
          </table>
        </td>
        <td width="30" background="right_border.jpg"><img src="clear.gif" width="30" height="50" /></td>
      </tr>
      <tr>
        <td colspan="3" background="footer.jpg" class="footer" height="80"/>This website best viewed using:<br /><a href="http://www.firefox.com"><img src="firefox_logo.gif" width="110" height="40" border="0" /></a></td>
      </tr>
    </table>
    <script type="text/javascript">
    <!--
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"../SpryAssets/SpryMenuBarDownHover.gif", imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
    //-->
    </script>
    </body>
    <!-- InstanceEnd --></html>

    Syntax error in INSERT INTO statement.  INSERT INTO Users ([First Name], [Last Name], [Email Address], Password)
    That oh-so-uninformative error is because "Password" is a reserved word with your database driver.  Either escape it by putting square brackets around it too, or rename the column permanently. It is best to avoid using reserved words whenever possible. So renaming the column is the better option.  Also, I would try and avoid using invalid characters like spaces in column names ie "First Name". It is technically allowed, but it requires special handling everywhere which adds unecessary complexity.
    I'm not sure what the problem is, but I'm getting a syntax error referencing this particular portion of the code:
    Do not take the error line numbers as gospel. Sometimes they just indicate that the error is within the vincinty of that line.
    I'm using Dreamweaver CS3 to help generate most of the code
    Unforutnately, DW wizards generate some truly awful and verbose code.  To give you an idea, here is what the query should look like, without all the wizard nonsense.
      <cfparam name="FORM.first_name" default="">
      <cfparam name="FORM.last_name" default="">
      <cfparam name="FORM.email" default="">
      <cfparam name="FORM.FORM.password" default="">
      <cfquery datasource="YourDSNName"> 
        INSERT INTO Users ([First Name], [Last Name], [Email Address], [Password])
        VALUES (
          <cfqueryparam value="#FORM.first_name#" cfsqltype="cf_sql_varchar">
         , <cfqueryparam value="#FORM.last_name#" cfsqltype="cf_sql_varchar">
         , <cfqueryparam value="#FORM.email#" cfsqltype="cf_sql_varchar">
         , <cfqueryparam value="#FORM.password#" cfsqltype="cf_sql_varchar">
      </cfquery>
    CF is pretty easy to learn. You might want to begin perusing the CF documentation and a few tutorials to get more familiar with the language. Since you are working with a database, I would also recommend a  SQL tutorial.

  • Insert into MSAccess Table

    Hi Friends
    Iam trying to insert a record in MSAccess table from a legacy file. I could establish the connection to MSAccess and could able to retrive the data from it. But while inserting it gives me an error:
    <b>Receiver Adapter v1109 for Party '', Service 'ORACLE_SERVER_BS':
    Configured at 11:41:23 2005-10-24
    Last message processing started 12:18:28 2005-10-24, Error: TransformException error in xml processor class, rollback:
    Error processing request in sax parser: Error when executing statement for table/stored proc. 'VendorMaster': java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
    at com.sap.aii.adapter.jdbc.xml2sql.service(xml2sql.java:179)
    at com.sap.aii.adapter.jdbc.XI2JDBC.onInternalMessage(XI2JDBC.java:347)
    at com.sap.aii.adapter.jdbc.SapAdapterServiceFrameImpl.callSapAdapter_i(SapAdapterServiceFrameImpl.java:170)
    at com.sap.aii.adapter.jdbc.SapAdapterServiceFrameImpl.callSapAdapter(SapAdapterServiceFrameImpl.java:146)
    at com.sap.aii.af.modules.CallAdapterWithMessageBean.process_receiver(CallAdapterWithMessageBean.java:204)
    at com.sap.aii.af.modules.CallAdapterWithMessageBean.process(CallAdapterWithMessageBean.java:159)
    at com.sap.aii.af.mp.module.ModuleLocalLocalObjectImpl1.process(ModuleLocalLocalObjectImpl1.java:103)
    at com.sap.aii.af.mp.ejb.ModuleProcessorBean.process(ModuleProcessorBean.java:221)
    at com.sap.aii.af.mp.processor.ModuleProcessorLocalLocalObjectImpl0.process(ModuleProcessorLocalLocalObjectImpl0.java:103)
    at com.sap.aii.af.listener.AFWListenerBean.onMessage(AFWListenerBean.java:220)
    at com.sap.aii.af.listener.AFWListenerLocalObjectImpl0.onMessage(AFWListenerLocalObjectImpl0.java:103)
    at com.sap.aii.af.ra.ms.impl.ServicesImpl.deliver(ServicesImpl.java:274)
    at com.sap.aii.adapter.xi.ms.XIEventHandler.onDeliver(XIEventHandler.java:653)
    at com.sap.aii.af.ra.ms.impl.core.queue.ReceiveConsumer.invokeHandler(ReceiveConsumer.java:374)
    at com.sap.aii.af.ra.ms.impl.core.queue.ReceiveConsumer.onMessage(ReceiveConsumer.java:98)
    at com.sap.aii.af.ra.ms.impl.core.queue.Queue.run(Queue.java:448)
    at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)</b>
    The structure for the target field is
    VendorMaster_DT
    >Insert
    >>VendorMaster
      action
      table
    >>>access
       VendorNumber
       LastName

    Hi,
    <i>java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] <b>Syntax error in INSERT INTO statement.</b>at com.sap.aii.adapter.jdbc.xml2sql.service(xml2sql.java:179)</i>
    looks like your insert statement in the inbound message is wrong, check your inbound message...
    naveen

  • Date/Time Field in Access 2000 - INSERT INTO ... syntax error

    I am using Labview 6.1 Professional with the Database Connectivity Toolkit. When I execute this SQL Command "INSERT INTO PRODUCTION (Part, Passed, Date) VALUES ('Part#1', 2, '10/10/2003 10:10:10 AM')" I get a Run-Time Syntax Error. If I remove the Date Label and Date Value it works. What is the proper Format of the Date/Time Type Field in ACCESS 2000 for Labview 6.1 SQL? I have seen and tried all of the solutions already posted like MSG 1ZNAJHJ6.

    Well, if it's any consolation handling dates is a pain regardless of which database you use. In any case, I created a table with the following definition:
    CREATE TABLE testing
    (item1 INTEGER,
    item2 DATE)
    I them did the following insert:
    INSERT INTO testing
    VALUES (1, '18/11/1953 04:20:00');
    And everything worked fine. Note that in the date (my Bday, BTW) the format is DD/MM/YYYY followed by the time.
    What exactly is the error you're getting? Can you post the exact text of the error message. Also, I ran my test using the examples that come with LabSQL--not the toolkit.
    Mike...
    Oops, just noticed something. You have a column name that is probibly a reserved word "Date". Try your insert as:
    INSERT INTO PRODUCTION
    VALUES
    ('Part#1', 2, '10/10/2003 10:10:10 AM')
    If there is only those three columns and they the order the data appears is the same as the column order, you don't need the column list. If this works (and it should--I just tried it) I would only view it as a temporary patch. The column name should be changed.
    This is also a good reason to not use the Access GUI to create tables. If you tried creating a table like that in SQL you would have gotten an error message. Learning to build tables in SQL code isn't hard and it adds an extra layer of error checking that the GUI apparently doesn't think is important.
    If you're interested let me know and I can send you the info on a really good book on SQL...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Apex Application inserting into two tables from two regions in a page

    Hey Guys,
    Fairly new to apex like two days. So please bare with me. I am using apex 4.0.2.00.07.
    I have a page with two regions. The first region has only one row and I have no problems accessing it and inserting those values into the table this is what I used to access one column from that one row APEX_APPLICATION.G_F03(1)
    The second region is an interactive report, to which I have managed to add a checkbox and a textbox.
    1)So if a checkbox has been checked off the row should be inserted
    2) if the textbox has been entered it should replaceone of the values.
    My question is how to access the second region? I started a loop based on the rows in the collection but that is as far as I got.
    FOR idx IN 1..l_collectionTable_name
    loop
    end loop
    Any help would be greatly appreciated?
    Thank you
    Edited by: Aj05 on Aug 2, 2012 2:10 PM

    Hi Phil I used the following code
    <cfquery name="qArrivalDates" datasource="rayannesql">
    SET NOCOUNT ON
    INSERT INTO booking (book_made, book_checkin_date,
    book_checkout_date, book_adults, book_children)
    VALUES('#FORM.book_made#','#FORM.book_checkin_date#','#FORM.book_checkout_date#','#FORM.bo ok_adults#','#FORM.book_children#')
    SELECT SCOPE_IDENTITY() AS theNewId;
    SET NOCOUNT OFF
    </cfquery>
    <cfquery name="qArrivalDates" datasource="rayannesql">
    INSERT INTO Customer( firstname, lastname, address, address2,
    city, state, postalcode, country, phone, mobile, email, notes)
    Values (#qArrivalDates.theNewId# '#FORM.firstname#',
    '#FORM.lastname#', '#FORM.address#', '#FORM.address2#',
    '#FORM.city#', '#FORM.state#', '#FORM.postalcode#',
    '#FORM.country#', '#FORM.phone#', '#FORM.mobile#', '#FORM.email#',
    '#FORM.notes#' )
    </cfquery>
    When I tried to complete the form, I got the following error
    Macromedia][SequeLink JDBC Driver][ODBC
    Socket][Microsoft][SQL Native Client][SQL Server]Incorrect syntax
    near 'Fred'.
    The error occurred in
    C:\Inetpub\wwwroot\rayanne\customerinsertsql.cfm: line 16
    14 : <cfquery name="qArrivalDates"
    datasource="rayannesql">
    15 : INSERT INTO Customer( firstname, lastname, address,
    address2, city, state, postalcode, country, phone, mobile, email,
    notes)
    16 : Values (#qArrivalDates.theNewId# '#FORM.firstname#',
    '#FORM.lastname#', '#FORM.address#', '#FORM.address2#',
    '#FORM.city#', '#FORM.state#', '#FORM.postalcode#',
    '#FORM.country#', '#FORM.phone#', '#FORM.mobile#', '#FORM.email#',
    '#FORM.notes#' )
    17 : </cfquery>

  • Insert into using a select and dynamic sql

    Hi,
    I've got hopefully easy question. I have a procedure that updates 3 tables with 3 different update statements. The procedure goes through and updates through ranges I pass in. I am hoping to create another table which will pass in those updates as an insert statement and append the data on to the existing data.
    I am thinking of using dynamic sql, but I am sure there is an easy way to do it using PL/SQL as well. I have pasted the procedure below, and what I'm thinking would be a good way to do it. Below I have pasted my procedure and the bottom is the insert statement I want to use. I am faily sure I can do it using dynamic SQL, but I am not familiar with the syntax.
    CREATE OR REPLACE PROCEDURE ACTIVATE_PHONE_CARDS (min_login in VARCHAR2, max_login in VARCHAR2, vperc in VARCHAR2) IS
    BEGIN
    UPDATE service_t SET status = 10100
    WHERE poid_id0 in
    (SELECT poid_id0 FROM service_t
    WHERE poid_type='/service/telephony'
    AND login >= min_login AND login <= max_login);
    DBMS_OUTPUT.put_line( 'Service Status:' || sql%rowcount);
    UPDATE account_t SET status = 10100
    WHERE poid_id0 IN
    (SELECT account_obj_id0 FROM service_t
    WHERE poid_type = '/service/telephony'
    AND login >= min_login AND login <= max_login);
    DBMS_OUTPUT.put_line( 'Account Status:' || sql%rowcount);
    UPDATE account_nameinfo_t SET title=Initcap(vperc)
    WHERE obj_id0 IN
    (SELECT account_obj_id0 FROM service_t
    WHERE poid_type='/service/telephony'
    AND login >=min_login AND login <= max_login);
    DBMS_OUTPUT.put_line('Job Title:' || sql%rowcount);
    INSERT INTO phone_card_activation values which = 'select a.status, s.status, s.login, to_char(d.sysdate,DD-MON-YYYY), ani.title
    from account_t a, service_t s, account_nameinfo_t ani, dual d
    where service_t.login between service_t.min_login and service_t.max_login
    and ani.for_key=a.pri_key
    and s.for_key=a.pri_key;'
    END;
    Thanks for any advice, and have a good weekend.
    Geordie

    Correct my if I am wrong but aren't these equal?
    UPDATE service_t SET status = 10100
    WHERE poid_id0 in
    (SELECT poid_id0 FROM service_t
    WHERE poid_type='/service/telephony'
    AND login >= min_login AND login <= max_login);
    (update all the records where there id is in the sub-query that meet the WHERE Clause)
    AND
    UPDATE service_t SET status = 10100
    WHERE poid_type='/service/telephony'
    AND login >= min_login AND login <= max_login);
    (update all the records that meet the WHERE Clause)
    This should equate to the same record set, in which case the second update would be quicker without the sub-query.

  • Using INSERT INTO for FDM Memory Issue

    All -
    We configured FDM to run an integration script into our EBS instance upon the import step. It worked fine for a time, then we began running out of memory on the FDM server. Upon Oracle's suggestion, we stopped running through a record set to append and update the values to strWorkTableName and instead began using INSERT INTO. I admit, I have never needed to use the INSERT INTO way of doing things so I may be missing something bery basic.
    Our integration script:
    Function SQLIntegration2(strLoc, lngCatKey, dblPerKey, strWorkTableName)
    'Oracle Hyperion FDM IMPORT Integration Script:
    'Created By:       karks
    'Date Created:       2011-10-26 13:05:18
    'Purpose:
    Dim strSQL     'SQL string
    Dim lngPartitionKey
    Dim strConn 'Connection string to the source data
    Set cnSS = CreateObject("ADODB.Connection")
    lngPartitionKey = RES.PlngLocKey
    strConn= "File Name=C:\Users\karksadm\Desktop\NewConnection.udl;"
    cnSS.open strConn
    strSQL = "Insert Into " & strWorkTableName & " (PartitionKey, CatKey, PeriodKey, DataView, Amount , Account, Entity, ICP, UD1, UD2, UD3, UD4) "
    strSQL = strSQL & "SELECT " & lngPartitionKey & ", " & lngCatKey & ", TO_DATE (TO_DATE ('30/12/1899','dd/mm/yyyy')+" & dblPerKey & "), 'YTD', EBS.YTD_BALANCE, EBS.ACCOUNT, EBS.SEGMENT1, EBS.SEGMENT5, EBS.SEGMENT4, EBS.SEGMENT5, '[None]', EBS.CURRENCY_CODE FROM "
    strSQL = strSQL & "(Select D.NAME, A.CODE_COMBINATION_ID, D.NAME LEDGER_NAME, A.ACTUAL_FLAG, C.PERIOD_YEAR, TO_CHAR (C.START_DATE, 'MON-YY') AS PERIOD, B.SEGMENT1, (B.SEGMENT2 || B.SEGMENT3) As ACCOUNT, B.SEGMENT4, B.SEGMENT5, A.CURRENCY_CODE, "
    strSQL = strSQL & "(SUM (A.BEGIN_BALANCE_DR) + SUM (A.PERIOD_NET_DR) - SUM (A.BEGIN_BALANCE_CR) - SUM (A.PERIOD_NET_CR)) As YTD_BALANCE "
    strSQL = strSQL & "FROM GL.GL_BALANCES A, GL.GL_CODE_COMBINATIONS B, GL.GL_PERIODS C, GL.GL_LEDGERS D "
    strSQL = strSQL & "WHERE 1 = 1 And A.LEDGER_ID = D.LEDGER_ID And A.PERIOD_NUM = C.PERIOD_NUM And C.PERIOD_YEAR = A.PERIOD_YEAR "
    strSQL = strSQL & "And A.CODE_COMBINATION_ID = B.CODE_COMBINATION_ID And B.SUMMARY_FLAG = 'N' AND C.PERIOD_SET_NAME = D.PERIOD_SET_NAME "
    strSQL = strSQL & "And (B.SEGMENT1 = 001 And A.CURRENCY_CODE = 'USD' And D.LEDGER_ID = 2022) "
    strSQL = strSQL & "And C.END_DATE = TO_DATE (TO_DATE ('30/12/1899','dd/mm/yyyy')+" & dblPerKey & ") "
    strSQL = strSQL & "And B.CHART_OF_ACCOUNTS_ID = D.CHART_OF_ACCOUNTS_ID And A.ACTUAL_FLAG = 'A' "
    strSQL = strSQL & "And ((A.BEGIN_BALANCE_DR) + (A.PERIOD_NET_DR) - ((A.BEGIN_BALANCE_CR) + (A.PERIOD_NET_CR))) <> 0 "
    strSQL = strSQL & "GROUP BY A.CODE_COMBINATION_ID, D.NAME, A.CURRENCY_CODE, TO_CHAR (C.START_DATE,'MON-YY'), C.PERIOD_YEAR, A.ACTUAL_FLAG, B.SEGMENT1, (B.SEGMENT2 || B.SEGMENT3), B.SEGMENT4, B.SEGMENT5 "
    strSQL = strSQL & "ORDER BY B.SEGMENT4) EBS"
    DW.DataManipulation.fExecuteDML(strSQL)
    'Give success message
    RES.PlngActionType = 2
    RES.PstrActionValue = "SQL Import successful!"
    'Assign Return value
    SQLIntegration2 = True
    cnSS.close
    Set cnSS = Nothing
    End FunctionI can run the SQL minus the Insert line in my SQL Developer and it works fine. When I run the script in its entirety in FDM, we receive the following:
    ** Begin FDM Runtime Error Log Entry [2012-01-23 11:37:30] **
    ERROR:
    Code............................................. -2147217865
    Description...................................... ORA-00942: table or view does not exist
    Insert Into tWibison72564424799 (PartitionKey, CatKey, PeriodKey, DataView, Amount , Account, Entity, ICP, UD1, UD2, UD3, UD4) SELECT 772, 28, TO_DATE (TO_DATE (N'30/12/1899',N'dd/mm/yyyy')+40724), N'YTD', EBS.YTD_BALANCE, EBS.ACCOUNT, EBS.SEGMENT1, EBS.SEGMENT5, EBS.SEGMENT4, EBS.SEGMENT5, N'[None]', EBS.CURRENCY_CODE FROM (Select D.NAME, A.CODE_COMBINATION_ID, D.NAME LEDGER_NAME, A.ACTUAL_FLAG, C.PERIOD_YEAR, TO_CHAR (C.START_DATE, N'MON-YY') AS PERIOD, B.SEGMENT1, (B.SEGMENT2 || B.SEGMENT3) As ACCOUNT, B.SEGMENT4, B.SEGMENT5, A.CURRENCY_CODE, (SUM (A.BEGIN_BALANCE_DR) + SUM (A.PERIOD_NET_DR) - SUM (A.BEGIN_BALANCE_CR) - SUM (A.PERIOD_NET_CR)) As YTD_BALANCE FROM GL.GL_BALANCES A, GL.GL_CODE_COMBINATIONS B, GL.GL_PERIODS C, GL.GL_LEDGERS D WHERE 1 = 1 And A.LEDGER_ID = D.LEDGER_ID And A.PERIOD_NUM = C.PERIOD_NUM And C.PERIOD_YEAR = A.PERIOD_YEAR And A.CODE_COMBINATION_ID = B.CODE_COMBINATION_ID And B.SUMMARY_FLAG = N'N' AND C.PERIOD_SET_NAME = D.PERIOD_SET_NAME And (B.SEGMENT1 = 001 And A.CURRENCY_CODE = N'USD' And D.LEDGER_ID = 2022) And C.END_DATE = TO_DATE (TO_DATE (N'30/12/1899',N'dd/mm/yyyy')+40724) And B.CHART_OF_ACCOUNTS_ID = D.CHART_OF_ACCOUNTS_ID And A.ACTUAL_FLAG = N'A' And ((A.BEGIN_BALANCE_DR) + (A.PERIOD_NET_DR) - ((A.BEGIN_BALANCE_CR) + (A.PERIOD_NET_CR))) <> 0 GROUP BY A.CODE_COMBINATION_ID, D.NAME, A.CURRENCY_CODE, TO_CHAR (C.START_DATE,N'MON-YY'), C.PERIOD_YEAR, A.ACTUAL_FLAG, B.SEGMENT1, (B.SEGMENT2 || B.SEGMENT3), B.SEGMENT4, B.SEGMENT5 ORDER BY B.SEGMENT4) EBS
    Procedure........................................ clsDataManipulation.fExecuteDML
    Component........................................ upsWDataWindowDM
    Version.......................................... 1112
    Thread........................................... 4424
    IDENTIFICATION:
    User............................................. ibisons
    Computer Name.................................... HOU-HYSDEV02
    App Name......................................... SWNFDMRC
    Client App....................................... WebClient
    CONNECTION:
    Provider......................................... ORAOLEDB.ORACLE
    Data Server......................................
    Database Name.................................... FDMDEV
    Trusted Connect.................................. False
    Connect Status.. Connection Open
    GLOBALS:
    Location......................................... EBSINTEGRATION
    Location ID...................................... 772
    Location Seg..................................... 25
    Category......................................... EBS2
    Category ID...................................... 28
    Period........................................... Jun - 2011
    Period ID........................................ 6/30/2011
    POV Local........................................ False
    Language......................................... 1033
    User Level....................................... 1
    All Partitions................................... True
    Is Auditor....................................... False
    ** Begin FDM Runtime Error Log Entry [2012-01-23 11:37:31] **
    ERROR:
    Code............................................. -2147217865
    Description...................................... Data access error.
    At line: 33
    Procedure........................................ clsImpProcessMgr.fExecuteImpScript
    Component........................................ upsWObjectsDM
    Version.......................................... 1112
    Thread........................................... 4424
    IDENTIFICATION:
    User............................................. ibisons
    Computer Name.................................... HOU-HYSDEV02
    App Name......................................... SWNFDMRC
    Client App....................................... WebClient
    CONNECTION:
    Provider......................................... ORAOLEDB.ORACLE
    Data Server......................................
    Database Name.................................... FDMDEV
    Trusted Connect.................................. False
    Connect Status.. Connection Open
    GLOBALS:
    Location......................................... EBSINTEGRATION
    Location ID...................................... 772
    Location Seg..................................... 25
    Category......................................... EBS2
    Category ID...................................... 28
    Period........................................... Jun - 2011
    Period ID........................................ 6/30/2011
    POV Local........................................ False
    Language......................................... 1033
    User Level....................................... 1
    All Partitions................................... True
    Is Auditor....................................... False
    ** Begin FDM Runtime Error Log Entry [2012-01-23 11:37:31] **
    ERROR:
    Code............................................. -2147217865
    Description...................................... Data access error.
    At line: 33
    Procedure........................................ clsImpProcessMgr.fLoadAndProcessFile
    Component........................................ upsWObjectsDM
    Version.......................................... 1112
    Thread........................................... 4424
    IDENTIFICATION:
    User............................................. ibisons
    Computer Name.................................... HOU-HYSDEV02
    App Name......................................... SWNFDMRC
    Client App....................................... WebClient
    CONNECTION:
    Provider......................................... ORAOLEDB.ORACLE
    Data Server......................................
    Database Name.................................... FDMDEV
    Trusted Connect.................................. False
    Connect Status.. Connection Open
    GLOBALS:
    Location......................................... EBSINTEGRATION
    Location ID...................................... 772
    Location Seg..................................... 25
    Category......................................... EBS2
    Category ID...................................... 28
    Period........................................... Jun - 2011
    Period ID........................................ 6/30/2011
    POV Local........................................ False
    Language......................................... 1033
    User Level....................................... 1
    All Partitions................................... True
    Is Auditor....................................... False
    I really think the issue is that I am not telling the script where to find the Oracle tables at. I left the code in where we were using the UDL to call in the opening of the record set, but since we are doing away with the record set how do I let FDM know where to find the Oracle tables?
    Thanks in advance - I've been wrestling with this for several days.
    Thanks you,
    Sarah

    Here's a script with INSERT INTO that works fine if FDM back-end is SQL DB and it's pulling from FDMHarris data warehouse which is on SQL Server.
    Problem is when FDM back-end is Oracle DB and it's pulling from FDMHarris data warehouse which is on SQL Server.
    I'm assuming the INSERT INTO statement needs to be written differently, syntax wise?
    Here's the error message displayed.
    ** Begin FDM Runtime Error Log Entry [2012-06-03 21:18:15] **
    ERROR:
    Code............................................. -2147217900
    Description...................................... ORA-00933: SQL command not properly ended
    INSERT INTO tWadmin476032843931 (PartitionKey, CatKey, PeriodKey, DataView, CalcAcctType, Entity, Account, UD1, UD2, UD4, Amount) SELECT 752, 12, N'30-Apr-2012', N'YTD', 9, Entity, Account, UD1, UD2, UD4, Amount FROM FDMHarris.dbo.tdataseg4;
    Procedure........................................ clsDataManipulation.fExecuteDML
    Component........................................ upsWDataWindowDM
    Version.......................................... 1112
    Thread........................................... 3284
    Function INSERTINTO(strLoc, lngCatKey, dblPerKey, strWorkTableName)
    'Oracle Hyperion FDM IMPORT Integration Script:
    'Created By:      admin
    'Date Created:      2012-06-03 11:31:39
    'Purpose:
    Dim objSS 'ADODB.Connection
    Dim strSQL 'SQL String
    Dim rs 'Recordset
    Dim rsAppend 'tTB table append rs Object
    Dim strPeriod
    Dim strYear
    'Period
    'strPeriod=MonthName(Month(RES.PdtePerKey))
    a=CStr(FormatDateTime(RES.PdtePerKey,1))
    'Tuesday,January 30, 2012
    b=Right(a,(Len(a)-Len(DW.Utilities.fParseString(a,1,1,",")))) '7
    c=DW.Utilities.fParseString(b,2,2,",")
    strPeriod=Left(c,3)
    'Year
    'strYear=Year(RES.PdtePerKey)
    strYear=Right(b,4)
    DW.DBTools.mLogError 1, CStr(strPeriod), CStr(strYear), Nothing
    'Initialize objects
    Set cnSS = CreateObject("ADODB.Connection")
    'Connect To SQL Server database
    cnss.open "Provider=SQLOLEDB.1;Password=datafusion;Persist Security Info=True;User ID=sa;Initial Catalog=FDMHarris;Data Source=dfv11122"
    'DW.DBTools.mLogError 1, CStr(strSQL), CStr(strSQL), Nothing
    'Initialize common SQL statement
    strSQL = "INSERT INTO " & _
    strWorkTableName & " " & _
    "(PartitionKey, CatKey, PeriodKey, DataView, CalcAcctType, Entity, Account, UD1, UD2, UD4, Amount) " & _
    "SELECT " & RES.PlngLocKey & ", " & RES.PlngCatKey & ", " & _
    "'" & Day(RES.PdtePerKey) & "-" & MonthName(Month(RES.PdtePerKey), True) & "-" & Year(RES.PdtePerKey) & "', " & _
    "'YTD', 9, Entity, Account, UD1, UD2, UD4, Amount " & _
    "FROM FDMHarris.dbo.tdataseg4;" '& _
    ' "WHERE Month = '" & strPeriod & "' And CalYear = '" & strYear & "'"
    DW.DBTools.mLogError 1, CStr(strSQL), CStr(strWorkTableName), Nothing
    DW.DataManipulation.fExecuteDML(strSQL)
    'cnss.Execute strSQL
    'Records loaded
    RES.PlngActionType = 6
    RES.PstrActionValue = "SQL Import successful!"
    'Assign Return value
    INSERTINTO = True
    cnss.Close
    Set cnss = Nothing
    End Function
    Edited by: user12152138 on Jun 3, 2012 6:43 PM

  • Insert into date column using EJB3.0 and toplink not working

    Hi All,
    I'm getting the following error whenever I attempt to insert a date value into my Oracle database.
    [TopLink Fine]: 2006.08.08 05:53:21.973--UnitOfWork(14806807)--Connection(14714759)--Thread(Thread[RMICallHand
    ler-0,5,RequestThreadGroup])--
    INSERT INTO EMP (EMPNO, ENAME, SAL, HIRE_DATE) VALUES (156, 'John', 2.0, {ts '2006-08-08 17:53:21.973'})
    [TopLink Warning]: 2006.08.08 05:53:22.036--UnitOfWork(14806807)--Thread(Thread[RMICallHandler-0,5,RequestThreadGroup])--
    Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)):
    oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00904: invalid column name
    The cause seems to be clear enough; from the sql above it seems that the timestamp syntax isn't being interpreted properly by either toplink or the JDBC driver , (I'm using whatever driver that comes with OC4J 10.1.3).
    I've seen somewhere that you can call setUseNativeSQL() in toplink but how do I get hold of the toplink session from an entity bean?
    That sounds like an awkward workaround anyway, what other workarounds are open to us?
    Thanks,
    C

    C,
    I don't use TopLink, but I suggest you set the "processEscapes" [Oracle database connection] property to "true", as described in the JDBC User's Guide and Reference.
    Oracle documentation can be accessed from here:
    http://www.oracle.com/technology/documentation/index.html
    Good Luck,
    Avi.

  • ORA-01403: no data found error hile inserting into a table

    Hi,
    I am populating a PL/SQL table(Array) with the data. From that array inserting into a Actual table. Before inserting am checking array count. Array count is greater than 0. But I am getting "ORA-01403: no data found" exception. I am not getting why this error is displaying.
    Please someone help me. Below is the code.
    CREATE OR REPLACE PROCEDURE XXDL_TEST_INSERT
    IS
    BEGIN
       IF  t_array.count> 0 THEN
        FND_FILE.PUT_LINE (FND_FILE.LOG, t_array.count);
        FOR i IN t_array.FIRST..t_array.LAST
        LOOP
            INSERT INTO XXDL_TEST
            VALUES(t_array(i).name )
      END LOOP;
    END IF;
    EXCEPTION
      WHEN OTHERS THEN
        FND_FILE.PUT_LINE (FND_FILE.LOG,SQLERRM);
    END;Thanks
    Alaka

    It looks like your Array is sparsely populated:
    SQL> DECLARE
      2    TYPE l_tab_type IS TABLE OF VARCHAR2(10)
      3      INDEX BY BINARY_INTEGER;
      4    l_tab l_tab_type;
      5  BEGIN
      6    l_tab(1) := 'A';
      7    l_tab(2) := 'B';
      8    l_tab(3) := 'C';
      9    FOR i IN l_tab.FIRST .. l_tab.LAST LOOP
    10      dbms_output.put_line(l_tab(i));
    11    END LOOP;
    12  END;
    13  /
    A
    B
    C
    PL/SQL procedure successfully completed.
    SQL>
    SQL> DECLARE
      2    TYPE l_tab_type IS TABLE OF VARCHAR2(10)
      3      INDEX BY BINARY_INTEGER;
      4    l_tab l_tab_type;
      5  BEGIN
      6    l_tab(1) := 'A';
      7    l_tab(3) := 'B';
      8    l_tab(4) := 'C';
      9    FOR i IN l_tab.FIRST .. l_tab.LAST LOOP
    10      dbms_output.put_line(l_tab(i));
    11    END LOOP;
    12  END;
    13  /
    A
    DECLARE
    ERROR at line 1:
    ORA-01403: no data found
    ORA-06512: at line 10Edited by: JS1 on Apr 11, 2009 8:59 AM
    You should also be using the FORALL syntax with INDICES OF. Check out The Docs

  • Can I insert into a form build in FORMSCENTRAL, a Formula with the numerical data that are updated by a given formula, like in Excel?

    Can I insert into a form build in FORMSCENTRAL, a Formula with the numerical data that are updated by a given formula, like in Excel?

    Hello danna,
    please have a look there as a first step: http://helpx.adobe.com/acrobat-com/formscentral/topics.html  >>> Formula syntax for built-in functions  >>> http://helpx.adobe.com/acrobat-com/formscentral/help/formula-syntax-built-in-functions.htm l
    Hans-Günter

Maybe you are looking for

  • Writing to digital port disrupting counter on PCI-6259? (nidaqmxbase)

    Hello, I've set up my PCI-6259 with an angular encoder counter, as per the C code example at http://zone.ni.com/devzone/cda/epd/p/id/5735 This appears to work great, but I would also like to use my PCI-6259's digital lines to control a TTL switch on

  • My desktop picture disappeared!

    I logged on this morning to find the "galaxy."  I had a jpeg in the "tile" layout there yesterday and it's no longer there.   I went to System Preferences to change it back, but when I clicked on the pictures folder none of my pictures showed up.  Th

  • NSM 2.5.2.1 - Massive DBASE directory

    Today I noticed that the volume NSM is installed on was out of space, upon closer inspection I discovered the DBASE directory was just over 20GB, yes, 20GB. Is there anyway of purging old data from the dbase to free up space? Thanks, Gabriel

  • Spry Select Firefoxs/Safari

    Hi All, Need help, the below spry select widget is not passing the select elements value after selection in Firefox and Safari... It works fine on IE and just realized its not working in Firefox/Safari... So this isn't a obvious spry functioning prob

  • BT Openreach lazy ?

    The Worle exchange near weston super mare has been active on the bt infinty website for close to a year now. Yet i am unable to get it... i have done some enquirys myself in responce to BT's automated responces! Yes the council has given BT openreach