update a record

Hello!

IAM using the following update statement.,.
update bal_assign c
set existing_balance=existing_balance+1
where exists(select distinct a.employeeid,a.leavetype,a.status,a.status2,a.todate,b.date_of_hol from empaply a,closed_hol b where a.todate=b.date_of_hol and a.status='Approved' and a.status2='Approved' and c.leavetype=a.leavetype and c.employeeid=a.employeeid)
 
Now, I want a set folder to update only once despite the way that many times I have run this code...

Is there a way to do this?

Pls help!

Thanks and greetings
user 10685325

Edited by: user10685325 may 4, 2009 04:34

You can optionally add a column "State" which actually is a flag that indicates that the record has been updated. Then change your update statement to update only records where the flag is false.

HTH!

Tags: Database

Similar Questions

  • How to change the disk that updates are recorded.

    Player updates are saved on my computer is full. I have 24 GB of free on another logical drive. I need to know how to get all the other updates to record on this disc. Thank you

    Windows updates must be installed and remain on the same drive or partition as the Windows operating system is installed on.  I suggest you install a larger hard drive. Carey Frisch

  • Update the records in the table

    I have an INCOME_LOT table. Now, I need to update records with the current max (lot_id) + rownum where lot_id = 0.
    Note: There are multiple records with lot_id = 0.

    CREATE TABLE INCOME_LOT
    (
    LOT_ID NUMBER OF NON-NULL,
    NUMBER OF DETAIL_ID
    DATE OF EFFECTIVE_DATE,
    DATE OF UPDATE_DATE
    )
    It is only a sample data of 4 records, while in fact, I have millions of records to be updated.

    Insert into INCOME_LOT
    (LOT_ID, DETAIL_ID, EFFECTIVE_DATE, UPDATE_DATE)
    Values
    (0, 5773490, TO_DATE (MAY 5, 2014 00:00:00 ',' DD/MM/YYYY HH24:MI:SS'), TO_DATE (MAY 6, 2014 00:22:40 ',' DD/MM/YYYY HH24:MI:SS'));))
    Insert into INCOME_LOT
    (LOT_ID, DETAIL_ID, EFFECTIVE_DATE, UPDATE_DATE)
    Values
    (0, 5773491, TO_DATE (MAY 5, 2014 00:00:00 ',' DD/MM/YYYY HH24:MI:SS'), TO_DATE (MAY 6, 2014 00:22:40 ',' DD/MM/YYYY HH24:MI:SS'));))
    Insert into INCOME_LOT
    (LOT_ID, DETAIL_ID, EFFECTIVE_DATE, UPDATE_DATE)
    Values
    (0, 5773492, TO_DATE (MAY 5, 2014 00:00:00 ',' DD/MM/YYYY HH24:MI:SS'), TO_DATE (MAY 6, 2014 00:22:40 ',' DD/MM/YYYY HH24:MI:SS'));))
    Insert into INCOME_LOT
    (LOT_ID, DETAIL_ID, EFFECTIVE_DATE, UPDATE_DATE)
    Values
    (0, 5773493, TO_DATE (MAY 5, 2014 00:00:00 ',' DD/MM/YYYY HH24:MI:SS'), TO_DATE (MAY 6, 2014 00:22:41 ',' DD/MM/YYYY HH24:MI:SS'));))
    COMMIT;

    Can someone help me to update all records with a single SQL query or maybe a PL/SQL block? I could design a cursor to update, but it would be tedious to use.

    Do you want this:

    UPDATE INCOME_LOT

    Set lot_id = 262696 + ROWNUM

    WHERE lot_id = 0;

  • Need add/update two records on click on the create/update button

    I have a table with 5 columns

    1 ID - primary key

    2 name

    3. address

    4 CARB

    5 KADER

    Now whenever I do an insert in this table to this table I have to add two rows, as shown below:

    1st row - (name1, Add1, 717, 717)

    2nd place - (name1, Add1, 515, 515)

    Name and address values are entries of the screen and the CARB & KADER values are fixed (717 or 515). So for each click on the button create two records needs to be inserted.

    Even when I update to say record particular Carb - 717 & kader-717, I must also update other file too Carb-515 & kader-515. For each click on the update button, so I need to update two records.

    Please tell me as to how I will do this

    Hello

    Why do you not use insert manual and update according to your requirement process?... Gives 'Never' for automatic processing of the DML and try to create a manual process (PL/SQL blocks) and give the condition.

    Thank you

    Lacombe

  • Update multiple records at once

    First, thank you very much the people who have helped me out several times now. I put things together and came across another issue of 'beauty' begin as follows. In the previous topics, I had a way to get to an array of automated classification based on the inputs of a fixtures table and some simple calculations. Now, which has been accomplished which resulted in me having to update all the teams by simply clicking a button.

    As you can see in the code below, using a table with every row a form, at the end of the line, there is a button called 'OK' I have to push to update the record according to. A repeat region for all teams in this query shows the ranking of 'new', but is not yet inserted in the League table. Is it possible to have this repeat region without having to push 18 or 20 times a button update? At the end of the table, one (1) button update all records? The primary key is composed like this ' 0000 - u00a "(4 numéros un tiret puis un «u» 1 ou 2 numéros et 1 ou 2 lettres à nouveau)."

    <?php require_once('Connections/connection.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
    {
      $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      }
      return $theValue;
    }
    }

    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    }

    if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "klassement")) {
      $updateSQL = sprintf("UPDATE klassement SET wedstrijden=%s, overwinning=%s, verlies=%s, gelijkspel=%s, goalsvoor=%s, goalstegen=%s, goalverschil=%s, punten=%s WHERE ploegid=%s",
                           GetSQLValueString($_POST['wedstrijden'], "int"),
                           GetSQLValueString($_POST['overwinning'], "int"),
                           GetSQLValueString($_POST['verlies'], "int"),
                           GetSQLValueString($_POST['gelijkspel'], "int"),
                           GetSQLValueString($_POST['goalsvoor'], "int"),
                           GetSQLValueString($_POST['goalstegen'], "int"),
                           GetSQLValueString($_POST['goalverschil'], "int"),
                           GetSQLValueString($_POST['punten'], "int"),
                           GetSQLValueString($_POST['ploegid'], "text"));

      mysql_select_db($database_koscw, $koscw);
      $Result1 = mysql_query($updateSQL, $koscw) or die(mysql_error());

      $updateGoTo = "klassement-ploegen.php?reeksid=" . $row_klassement['reeksid'] . "";
      if (isset($_SERVER['QUERY_STRING'])) {
        $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
        $updateGoTo .= $_SERVER['QUERY_STRING'];
      }
      header(sprintf("Location: %s", $updateGoTo));
    }

    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
    {
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      }

      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      }
      return $theValue;
    }
    }

    $reeks_klassement = "-1";
    if (isset($_GET['reeksid'])) {
      $reeks_klassement = $_GET['reeksid'];
    }
    mysql_select_db($database_koscw, $koscw);
    $query_klassement = sprintf("select * from klassement where reeksid = %s order by status asc, punten desc, overwinning desc, goalverschil desc", GetSQLValueString($reeks_klassement, "text"));
    $klassement = mysql_query($query_klassement, $koscw) or die(mysql_error());
    $row_klassement = mysql_fetch_assoc($klassement);
    $totalRows_klassement = mysql_num_rows($klassement);

    $id_reeks = "-1";
    if (isset($_GET['reeksid'])) {
      $id_reeks = $_GET['reeksid'];
    }
    mysql_select_db($database_koscw, $koscw);
    $query_reeks = sprintf("select reeksnaam from reeksen where reeksid = %s", GetSQLValueString($id_reeks, "text"));
    $reeks = mysql_query($query_reeks, $koscw) or die(mysql_error());
    $row_reeks = mysql_fetch_assoc($reeks);
    $totalRows_reeks = mysql_num_rows($reeks);

    mysql_select_db($database_koscw, $koscw);
    $query_seizoen = "select * from seizoen";
    $seizoen = mysql_query($query_seizoen, $koscw) or die(mysql_error());
    $row_seizoen = mysql_fetch_assoc($seizoen);
    $totalRows_seizoen = mysql_num_rows($seizoen);

    $huidig=$row_seizoen['huidigseizoen'];
    ?>
    <!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">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <link rel="stylesheet" type="text/css" media="all" href="../_styles/koscw-admin.css" />
    <title>Klassement <?php echo $row_reeks['reeksnaam']; ?> | Beheerpaneel | 1349</title>
    </head>
    <body>
    <div id="container">
    <h1 class="overzichth1">Klassement <?php echo $row_reeks['reeksnaam']; ?></h1>
    <?php if ($totalRows_klassement > 0) { // Show if recordset not empty ?>
    <table cellpadding="5" cellspacing="0" border="0" id="klassement">
    <tr>
      <td class="klassementsmall bgccc bold"></td>
           <td class="klassementteam bgccc bold">Ploegnaam</td>
           <td class="klassementsmall bgccc bold">+</td>
           <td class="klassementsmall bgccc bold">-</td>
           <td class="klassementsmall bgccc bold">=</td>
          <td class="klassementsmall bgccc bold">#</td>
           <td class="klassementsmall bgccc bold"><img src="../_img/goalsmade.png" alt="Goals +" /></td>
           <td class="klassementsmall bgccc bold"><img src="../_img/goalsagainst.png" alt="Goals -" /></td>
           <td class="klassementsmall bgccc bold"><img src="../_img/goalsdifference.png" alt="Goals &asymp;" /></td>
           <td class="klassementsmall bgccc bold">PTN</td>
          <td class="klassementsmall bgccc"> </td>
    </tr>
    <?php
    $i=0;
    do {
    $i++;
    if($i % 2) { //this means if there is a remainder
         echo "<tr class=\"calendareven\">";
    } else { //if there isn't a remainder we will do the else
         echo "<tr class=\"calendarodd\">";
    }
    ?>
    <td>
    <?php
    $rank += 1;
    echo $rank;
    ?>      </td>
           <td class="klassementteam">
              <?php
            $thuisploeg=$row_klassement ['ploegid'];
              $sql_select_thuisploeg="select ploegnaam from ploegen where ploegid = ('$thuisploeg')";
              $resultset_thuisploeg=mysql_query($sql_select_thuisploeg);
              while ($data_thuisploeg=mysql_fetch_array($resultset_thuisploeg))
              {echo $data_thuisploeg['ploegnaam'] . " ";}?></td>
           <form action="<?php echo $editFormAction; ?>" method="POST" name="klassement">
          <input type="hidden" name="ploegid" value="<?php echo $row_klassement ['ploegid']; ?>" />
           <td>
          <?php
           $tw=$row_klassement['ploegid'];
           $sql_select_tw="SELECT COUNT( * ) AS twin FROM kalender WHERE seizoen = '$huidig' AND speeldag !=0 AND thuisploegid = '$tw' AND thuisploeggoals > bezoekersgoals";
           $resultset_tw=mysql_query($sql_select_tw);
           $data_tw=mysql_fetch_array($resultset_tw);
           $data_tw['twin'];
          
           $uitwin=$row_klassement['ploegid'];
           $sql_select_uitwin="SELECT COUNT( * ) AS awin FROM kalender WHERE seizoen = '$huidig' AND speeldag !=0 AND bezoekersid = '$uitwin' AND thuisploeggoals < bezoekersgoals";
           $resultset_uitwin=mysql_query($sql_select_uitwin);
           $data_uitwin=mysql_fetch_array($resultset_uitwin);
           $data_uitwin['awin'];
          
           $win=($data_tw['twin'])+($data_uitwin['awin']);
           ?>
          <input type="text" name="overwinning" value="<?php echo $win; ?>" class="inputscore" readonly="readonly" />
          </td>
           <td>
          <?php
           $tv=$row_klassement['ploegid'];
           $sql_select_tv="SELECT COUNT( * ) AS tver FROM kalender WHERE seizoen = '$huidig' AND speeldag !=0 AND thuisploegid = '$tv' AND thuisploeggoals < bezoekersgoals";
           $resultset_tv=mysql_query($sql_select_tv);
           $data_tv=mysql_fetch_array($resultset_tv);
           $data_tv['tver'];
          
           $uitverlies=$row_klassement['ploegid'];
           $sql_select_uitverlies="SELECT COUNT( * ) AS aver FROM kalender WHERE seizoen = '$huidig' AND speeldag !=0 AND bezoekersid = '$uitverlies' AND thuisploeggoals > bezoekersgoals";
           $resultset_uitverlies=mysql_query($sql_select_uitverlies);
           $data_uitverlies=mysql_fetch_array($resultset_uitverlies);
           $data_uitverlies['aver'];
          
           $ver=($data_tv['tver'])+($data_uitverlies['aver']);
           ?>
          <input type="text" name="verlies" value="<?php echo $ver; ?>" class="inputscore" readonly="readonly" />
          </td>
           <td>
          <?php
           $thuisdraw=$row_klassement['ploegid'];
           $sql_select_thuisdraw="SELECT COUNT( * ) AS tdraw FROM kalender WHERE seizoen = '$huidig' AND speeldag !=0 AND thuisploegid = '$thuisdraw' AND thuisploeggoals = bezoekersgoals";
           $resultset_thuisdraw=mysql_query($sql_select_thuisdraw);
           $data_thuisdraw=mysql_fetch_array($resultset_thuisdraw);
           $data_thuisdraw['tdraw'];
          
           $awaydraw=$row_klassement['ploegid'];
           $sql_select_awaydraw="SELECT COUNT( * ) AS adraw FROM kalender WHERE seizoen = '$huidig' AND speeldag !=0 AND bezoekersid = '$awaydraw' AND thuisploeggoals = bezoekersgoals";
           $resultset_awaydraw=mysql_query($sql_select_awaydraw);
           $data_awaydraw=mysql_fetch_array($resultset_awaydraw);
           $data_awaydraw['adraw'];
          
           $draw=($data_thuisdraw['tdraw'])+($data_awaydraw['adraw']);
           ?>
          <input type="text" name="gelijkspel" value="<?php echo $draw ?>" class="inputscore" readonly="readonly" />
          </td>
          <td>
          <?php $wedstrijden=$win+$ver+$draw; ?>
          <input type="text" name="wedstrijden" value="<?php echo $wedstrijden; ?>" class="inputscore" readonly="readonly" />
          </td>
           <td>
           <?php
          $tgv=$row_klassement ['ploegid'];
           $sql_select_tgv="SELECT SUM( thuisploeggoals ) AS tgv1 FROM kalender WHERE seizoen = '$huidig' AND speeldag !=0 AND thuisploegid = '$tgv'";
           $resultset_tgv=mysql_query($sql_select_tgv);
           $data_tgv=mysql_fetch_array($resultset_tgv);
           $data_tgv['tgv1'];

          $ugv=$row_klassement ['ploegid'];
           $sql_select_ugv="SELECT SUM( bezoekersgoals ) AS ugv1 FROM kalender WHERE seizoen = '$huidig' AND speeldag !=0 AND bezoekersid = '$ugv'";
           $resultset_ugv=mysql_query($sql_select_ugv);
           $data_ugv=mysql_fetch_array($resultset_ugv);
           $data_ugv['ugv1'];

           $gv=($data_tgv['tgv1'])+($data_ugv['ugv1']);
           ?>
          <input type="text" name="goalsvoor" value="<?php echo $gv; ?>" class="inputscore" readonly="readonly" />
          </td>
           <td>
           <?php
          $tgt=$row_klassement ['ploegid'];
           $sql_select_tgt="SELECT SUM( thuisploeggoals ) AS tgt1 FROM kalender WHERE seizoen = '$huidig' AND speeldag !=0 AND bezoekersid = '$tgv'";
           $resultset_tgt=mysql_query($sql_select_tgt);
           $data_tgt=mysql_fetch_array($resultset_tgt);
           $data_tgt['tgt1'];

          $ugt=$row_klassement ['ploegid'];
           $sql_select_ugt="SELECT SUM( bezoekersgoals ) AS ugt1 FROM kalender WHERE seizoen = '$huidig' AND speeldag !=0 AND thuisploegid = '$ugv'";
           $resultset_ugt=mysql_query($sql_select_ugt);
           $data_ugt=mysql_fetch_array($resultset_ugt);
           $data_ugt['ugt1'];

           $gt=($data_tgt['tgt1'])+($data_ugt['ugt1']);
           ?>     
          <input type="text" name="goalstegen" value="<?php echo $gt; ?>" class="inputscore" readonly="readonly" />
          </td>
           <td>
           <?php $goals=$gv-$gt; ?>
          <input type="text" name="goalverschil" value="<?php echo $goals; ?>" class="inputscore" readonly="readonly" />
          </td>
           <td>
           <?php $punten=($win*3)+($draw*1); ?>
          <input type="text" name="punten" value="<?php echo $punten; ?>" class="inputscore" readonly="readonly" />
          </td>
          <td>
          <input type="submit" value="OK" />
          </td>
          <input type="hidden" name="MM_update" value="klassement" />
           </form>
      </tr>
      <?php } while ($row_klassement = mysql_fetch_assoc($klassement)); ?>
    </table>
    <?php } // Show if recordset not empty ?>

    </div>
    </body>
    </html>
    <?php
    mysql_free_result($klassement);

    mysql_free_result($reeks);

    mysql_free_result($seizoen);
    ?>

    Each record is separated, as well as a record can be updated at once, unless you want that all records have the same value.

    To update multiple records in a single operation, you must send the form tabular data. You do this by adding an empty pair of brackets at the end of the name attribute of each entry on the form like this:

     
    

    This translates by $_POST ['ploegid'] which contains a table of all IDS: $_POST ['ploegid'] [0], $_POST ['ploegid'] [1], $_POST ['ploegid'] [2] and so on. All the attributes of the repeat region name need to have added hooks. The following hidden field should be outside of the repeat region and may not have the brackets:

    
    

    You can then use a loop for updating the values like this:

    for ($j = 0, $len = count($_POST['ploegid']); $j < $len; $j++) {  $updateSQL = sprintf("UPDATE klassement SET wedstrijden=%s, overwinning=%s,   verlies=%s, gelijkspel=%s, goalsvoor=%s, goalstegen=%s, goalverschil=%s,   punten=%s WHERE ploegid=%s",                       GetSQLValueString($_POST['wedstrijden'][$j], "int"),                       GetSQLValueString($_POST['overwinning'][$j], "int"),                       GetSQLValueString($_POST['verlies'][$j], "int"),                       GetSQLValueString($_POST['gelijkspel'][$j], "int"),                       GetSQLValueString($_POST['goalsvoor'][$j], "int"),                       GetSQLValueString($_POST['goalstegen'][$j], "int"),                       GetSQLValueString($_POST['goalverschil'][$j], "int"),                       GetSQLValueString($_POST['punten'][$j], "int"),                       GetSQLValueString($_POST['ploegid'][$j], "text"));
    
      mysql_select_db($database_koscw, $koscw);  $Result1 = mysql_query($updateSQL, $koscw) or die(mysql_error());}
    
  • Update/Insert Record Wizard syntax error

    Try using the Wizard update of records, I get the following error when you click the update button:

    You have an error in your SQL syntax; consult the manual for your version of the MySQL server for the right syntax to use near 'Condition 'Very good' =, system = "related" ', Desc "=" Art and decoration July thru' at line 1
    I get to the page for editing a page that displays all dbase, passing the index parameter to the update page when I click on a bound column index number. The update page appears full on the appropriate folder. It won't just accept the update button is clicked without generating the error, even if I make any changes at all to the record.

    An almost identical error pops up just trying to open the page to insert a form created with the wizard insert a Record for this same table/dbase.

    You have an error in your SQL syntax; consult the manual for your version of the MySQL server for the right syntax to use near 'State system 'Desc', price, weight, ThumbPic, library LargePic' at line 1

    The mysql database update etc directly through php admin, but not through these pages of the wizard due to the error message. I have not modified any coding, just followed the instructions. I've done several of these pages Update and Insert before for other dbases and tables, so I have an idea of what I'm doing, but never confronted to this. This can be a problem with the syntax of one of my titles of rank or something to do with the structure of the dbase? Any ideas would be greatly appreciated? Thank you

    I got it. Condition, one of my domain names and the first field mentioned in the error message is a reserved word in MySQL 5... Shortcut to the top name, cleaned the server behaviors for the new name of field and Update and Insert work very well.

  • Insert and update DB record problem

    I am writing a management tool that allows you to add a record and or update a record in my PB. I bought a text editor or a WYSIWYG editor and I'm trying to adapt it to my code. The form uses a few fields of the form with the editor as the last place to enter the content of the page. Right now all my content in the DB is displayed in the editor, I change the content and submit the form and he lost all the content in the editor, but keeps the content in the fields of the form. This is the code that I use and works for the fields of the form, but not the Editor:

    < cfelseif ParameterExists (Form.btnEdit_OK) >

    < ParameterExists (Form.RecordID) cfif >
    "< cfupdate datasource =" "#sitedatasource #" username = "#siteUserID #" password = "" #sitePassword # "tableName ="SEEevents"formFields =" #Form.FieldList # ">"
    < cflocation url = "events_RecordView.cfm? RecordID = #Form.RecordID # ">"

    < cfelse >
    "< cfinsert datasource =" "#sitedatasource #" username = "#siteUserID #" password = "" #sitePassword # "tableName ="SEEevents"formFields =" #Form.FieldList # ">"
    "< name cfquery ="GetNewRecord"datasource =" "#sitedatasource #" username = "#siteUserID #" password = "' #sitePassword # ' LignesMax = 1 >"
    SELECT SEEevents.ID AS ID_Field
    OF SEEevents
    ORDER BY SEEevents.ID DESC
    < / cfquery >
    < cflocation url = "events_RecordView.cfm? RecordID = #GetNewRecord.ID_Field # ">"

    < / cfif >

    This is the code to insert a file in the editor that comes with the Editor:
    < cfoutput query = "myContent" >
    < cfquery datasource = "db_example", dbtype = "ODBC" >
    Update sampleTable set sampleContent = ' #evaluate ("form. MyEditorName #myContent.contentID #") #'"
    where contentID = #myContent.contentID #.
    < / cfquery >
    < / cfoutput >

    Can someone help me to make this work? I'm perplexed and in a place that I need this job immediately.
    Help, please

    Thank you

    Phoenix

    Quote:
    Posted by: newsgroup user
    > Error executing database query.
    > [Macromedia] [SequeLink JDBC Driver] [ODBC Socket] [Microsoft] [ODBC Microsoft
    [> Access Driver] syntax error (missing operator) in query expression "{d
    {> ' 2007-04-13'} ".
    It seems that the error is with your eventDate. in MS Access, dates should be
    entered as # #date # (where date is a date in the format dd/mm/yyyy
    (or d/m/yyyy, according to the regional settings in the database). but there
    should be # 3 on both sides of the date and not '.
    then try changing your SEEevents.eventDate =' #form.eventDate #' to
    SEEevents.eventDate = #form.eventDate #.
    If that always generates an error, you must analyze your form date
    on the ground and make a date in the format MS Access to him first, before
    Add your
    ' mm/dd/yyyy') > and then use it in your query:
    SEEevents.eventDate = ###eDate #.

    This might work, but there are two ways to solve this specific problem. One is to use cfqueryparam and the other is to use createodbcdate. These methods do not work only with access, but with any other databases as well. In addition, you don't have to worry about your date format.

  • Update a record questioned using the parameter

    Hi all

    Have someone to help me to update an interviewed record of forms. It's like that when I use ID to search for the details, I want to update the record you are searching.

    Arif

    Hi Arif,
    Here you're doing something complicated with you.

    1 UCID_PARAM and USERCREATION are 2 revenge in the same form
    2 UCID_PARAM contain column UCID which is the primary key of the table usercreation. I used this block to pass

    The blockk UCID_PARAM here is the database block and why you must pass the value as a parameter because as you say it is primary key and foreign key in the block. Then why do you use search mechanism Assembly. I mean just create relationship between UCID_PARAM and USERCREATION block or if he joins then just use the method ENTER_QUERY and EXECUTE_QUERY. I understand because if you enter a value in the UCID_PARAM block and goes to the block of detail and do EXECUTE_QUERY by selecting a WHERE CLAUSE.

    So, what's going to happen here. System takes into account that you are inserting record in UCID_PARAM. So, there is a field that is not null, then the error is coming.

    Just use the default behavior of your forms. Or if you really want to use this method. Next, create a block of data non-base to pass the parameter. Do not use UCID_PARAM as the database block.

    And one more thing, I noticed in your this clause

    set_block_property ('USERCREATION', onetime_where, 'UCID =' |) ': UCID_PARAM. UCID');

    It should be

    set_block_property('USERCREATION',onetime_where,'UCID='||:FORM_FIELD_NAME);

    I hope it is clear now.

    -Clément

  • Second update statement is not updated all records

    Hello

    I've written a procedure for updating a table "REFDUMP". The second statement to update the id of the procedure does not update all records. It updates only few records about 3500 off 15967.

    Please can someone help me in this.


    create or replace PROCEDURE refdump1
    AS
    cursor c1 is select r.REF_QUARTER, q.QUARTER, r.reference_date, refdump r.created r, q quarter
    where nvl (r.reference_date, r.created) = q.REFERENCE_DATE;

    cursor c2 is select r.REFnom_QUARTER, q.QUARTER, r.NOMINATION_DATE, refdump r.created r, q quarter
    where nvl (r.nomination_date, r.created) = q.REFERENCE_DATE;

    SLIDER C3 is SELECT * FROM country_region;



    BEGIN
    BEGIN
    I'm looping c1
    UPDATE refdump
    SET ref_quarter = i.quarter
    WHERE (reference_date, CREATED) = nvl nvl (i.reference_date, i.created);
    COMMIT;
    end loop;
    EXCEPTION WHEN others then
    DBMS_OUTPUT. Put_line (' error in the update of the quarter Ref');
    END;

    BEGIN
    I'm looping c2
    UPDATE refdump
    SET refnom_quarter = i.quarter
    WHERE the NVL (nomination_date, CREATED) = NVL (i.nomination_date, i.created);
    COMMIT;
    END LOOP;
    EXCEPTION WHEN others THEN
    DBMS_OUTPUT. Put_line ('error in the update of the quarter of nomination');
    END;

    BEGIN
    UPDATE refdump SET oracle_ovi = 'other '.
    WHERE oracle_ovi is null.
    COMMIT;
    END;

    BEGIN

    I'm looping c3
    UPDATE refdump SET country = i.country_name2, region_cluster = i.region_cluster, region = i.region
    Superior WHERE (countries) in (upper (i.country_name), upper (i.country_name2));
    COMMIT;
    END LOOP;
    END;

    BEGIN
    UPDATE refdump SET country = 'other '.
    WHEN the country is null;
    COMMIT;

    UPDATE refdump SET region_cluster = region, region = substr (region, 1, instr(region,'-') - 2).
    Countries WHERE = "other";
    END;

    END;


    Thank you
    Vikas
  • DB update multiple records in a table with a form

    I'm developing an online proofing system that displays a number of images and then allow the client to approve each image, but also to comment.

    I currently have a configuration table with the different elements (an image dynamically takes its name, details about the image and the required form fields). See this Image for layout

    I would then apply a repeat region (the number of signs vary) and you want to update all records with feedback from the customer and approval with a single form. How this is done? I downloaded a trial of the Toolbox for developers, but the documentation is horrible. I'd be willing to buy an extension that will allow, as appropriate.

    I found an extension that does this in two minutes:

    http://www.WebAssist.com/Professional/products/ProductDetails.asp?pid=117

    Great software, highly recommended. Easy to figure out and got this "problem" solved quickly.

  • How to update a record, if it is a composite key (primary key is based on two columns) in the OPS? page?

    Hello

    Actually I got to know this update of a record must be made when the primary key is based on two columns.

    Previously, I used SPEL for a column. It was working fine.

    But I came to know that regardless of the folder I try to update, it was the update page is coming up with the first combination of the record.

    As if RC 131

    RC 124

    RC 125 are the records.

    If I click on update of RC 124 also, the update page is coming up with RC 131 values as it is the first.

    So I understand that the SPEL should be based on two parameters, because it is a composite key.

    How to do?

    Please let me know if you don't understand the problem.

    Thank you.

    Wow!

    I got it.

    Thank you brothers, always a hope that you could help me

  • How to update multiple records

    Hello

    I have this problem

    I have this table whith 100,000 records with the State of the column = DONE

    NUM_CUSTSTATUSDATE
    00931754FACT05/05/2015-00:00:00
    00931741FACT05/05/2015-00:00:00
    00931742FACT05/05/2015-00:00:00
    00931744FACT05/05/2015-00:00:00
    00931743FACT05/05/2015-00:00:00
    00931747FACT05/05/2015-00:00:00
    00931746FACT05/05/2015-00:00:00

    I need to update the State of the column with values from another table

    AU_NUM_CUSTAU_DATEAU_STATUS
    0093175405/05/2015-00:00:00FACT
    0093174105/05/2015-00:00:00DELETE
    0093174205/05/2015-00:00:00DELETE
    0093174405/05/2015-00:00:00DELETE
    0093174305/05/2015-00:00:00DELETE
    0093174705/05/2015-00:00:00DELETE
    0093174605/05/2015-00:00:00DELETE

    Thanks if you can help

    Hello

    You can use the merge sql stmt:

    merge into target_table t

    using s source_table

    on (t.num_cust = s.au_num_cust and = t.date s.au_date)

    When matched then

    update set s.au_status = t.status

    Greetings,

    SIM

  • Update individual records create a long Instance running

    Hello.

    After I query a table of a BPEL I want and then update the status of these documents. Using a while loop activity may take some time depending on the number of records to update is necessary. What is the most effective way to update a table in order to avoid a long duration instance?

    I tried to invoke the adapter DB that contains a string like '1', '2', ' 3 ', ' 4'; then in the JCA have the SqlString as

    Update table

    record = '1'

    where to save in (#ids)

    I hoped that he would have been represented as

    Update table

    record = '1'

    where to save in ('1', '2', ' 3 ', ' 4')

    It did not work.

    This is supported out-of-box, create an adapter that is separated from the DB to update on the table operation, it would take root an element as a collection.

    Yes, you can use the foreach to a XSLT transformation for this activity.

  • How update multiple records at once?

    Hi all

    I'm using oracle 11g 1.2.1.0.

    I have table below

    emp_id, emp_name

    1                     X

    2                      Y

    3                      Z

    4                     M

    5                      Q

    ..                   ..

    .                     ...

    ..                    ....

    as I have 10 records and emp_id is unique

    I have an added email column more

    Now I want to update e-mail as a column as [email protected] [email protected] ... [email protected] .

    I created the sequence to concatenate the x and gamil.com.

    But how I will update to the atime all records with the e-mail data.

    Concerning

    Dale

    Or

    as you said that you have created a query sequence will look like:

    Update emp

    the value email = 'x '. seq_name.nextval | ' @gmail.com';

    In general, if you want to update all rows in a table do not put a clause where clause, even if I avoid using these updates its place to the user to use them or not.

    Cheerz,

    Stako

  • Add a new column and update of records

    I have the DW (OBAW) loaded at full load. Everything works fine.

    Now, I add a new column in a dimension in the DW (and in the ETL, RPD, CAD, etc.).

    I know that new (incremental) charges will take care of this column for the new/changed records... but

    Question is how can I update records, already loaded into PS for values in this column...?

    (a) I guess I can do this particular task of this dimension marked as 'full' DAC

    I'm not sure it's a good solution... I guess new ROW_WIDs will be generated and I have the connection with the fact table will be broken... Right?

    (b) I could blank the date of updating for this table W_ and/or refresher for this table S_ (from Siebel)

    I guess this could affect more than one task... or in other words all tasks dealing with this tables W_ and S_ - it also seems that the issue with the new ROW_WIDs will continue...

    Pls someone care to comment or offer a better solution?

    TXS. A lot.

    Antonio

    Assume that the table is W_ASSET_D or any other dimension...

    Yes, I plan to the OOB card personalization (in the folder custom, etc.).

    So if I'm correct... the option for setting null date discount for the W_ASSET_D table... and the use of DAC pointing to the custom task will take care of him...

    Just to be sure... It will not create new ROW_WIDs for W_ASSET_D?

    I'm worried by the _F FKs to this dimension tables...

    TXS for your help.

Maybe you are looking for