Inserting multiple records with many repeating fields

I trying to get my form to accept default values from previous entries on insert.
For instance a user has 10 records to enter into a table lets say it contains 8 fields. In these batches 3 of the 8 fields are always the same and the users don't want to repeat these 3 field entries for all 10 records. After the 1st insert they want these 3 fields defaulted to the previous entry's values.
Any ideas?

I'm using BC4J for development.
Also the records are going to be inserted one at a time.
So they will enter a record. Hit insert , add another...
and so on

Similar Messages

  • Insert multiple records with php

    please help me
    I have a problem in a multiple input records
    please help ...............
    example script:
    <?php require_once('Connections/koneksi.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_insert"])) && ($_POST["MM_insert"] == "form1")) {
      $insertSQL = sprintf("INSERT INTO mhs (NIM, NAMAMHS, ALAMAT) VALUES (%s, %s, %s)",
                           GetSQLValueString($_POST['NIM'], "text"),
                           GetSQLValueString($_POST['NAMAMHS'], "text"),
                           GetSQLValueString($_POST['ALAMAT'], "text"));
      mysql_select_db($database_koneksi, $koneksi);
      $Result1 = mysql_query($insertSQL, $koneksi) or die(mysql_error());
      $insertGoTo = "baru.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
        $insertGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $insertGoTo));
    $maxRows_Recordset1 = 10;
    $pageNum_Recordset1 = 0;
    if (isset($_GET['pageNum_Recordset1'])) {
      $pageNum_Recordset1 = $_GET['pageNum_Recordset1'];
    $startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;
    mysql_select_db($database_koneksi, $koneksi);
    $query_Recordset1 = "SELECT * FROM mhs";
    $query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
    $Recordset1 = mysql_query($query_limit_Recordset1, $koneksi) or die(mysql_error());
    $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    if (isset($_GET['totalRows_Recordset1'])) {
      $totalRows_Recordset1 = $_GET['totalRows_Recordset1'];
    } else {
      $all_Recordset1 = mysql_query($query_Recordset1);
      $totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
    $totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;
    ?><!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=utf-8" />
    <title>Untitled Document</title>
    </head>
    <body>
    <p> </p>
    <form action="<?php echo $editFormAction; ?>" method="post" name="form1" id="form1">
      <table border="1">
        <tr>
          <td>NIM</td>
          <td>NAMAMHS</td>
          <td>ALAMAT</td>
          <td> </td>
        </tr>
        <?php do { ?>
        <tr>
          <td><?php echo $row_Recordset1['NIM']; ?></td>
          <td><?php echo $row_Recordset1['NAMAMHS']; ?></td>
          <td><?php echo $row_Recordset1['ALAMAT']; ?></td>
          <td><table align="center">
            <tr valign="baseline">
              <td nowrap="nowrap" align="right">NIM:</td>
              <td><input type="text" name="NIM" value="" size="32" /></td>
            </tr>
            <tr valign="baseline">
              <td nowrap="nowrap" align="right">NAMAMHS:</td>
              <td><input type="text" name="NAMAMHS" value="<?php echo $row_Recordset1['NAMAMHS']; ?>" size="32" /></td>
            </tr>
            <tr valign="baseline">
              <td nowrap="nowrap" align="right">ALAMAT:</td>
              <td><input type="text" name="ALAMAT" value="<?php echo $row_Recordset1['ALAMAT']; ?>" size="32" /></td>
            </tr>
            <tr valign="baseline">
              <td nowrap="nowrap" align="right"> </td>
              <td> </td>
            </tr>
          </table></td>
        </tr>
        <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
      </table>
      <input type="hidden" name="MM_insert" value="form1" />
      <input type="submit" value="Insert record" />
    </form>
    <p> </p>
    </body>
    </html>
    <?php
    mysql_free_result($Recordset1);
    ?>

    PowerMilk wrote:
     I want to update multiple rows with one click on the submit button.Unfortunately, it doesn't work. What is wrong in the code?
    It would be more helpful if you were to say what happens. "It doesn't work" isn't very helpful.
    However, a quick look at your code reveals that your hidden field that contains the ID is outside the loop (repeat region) in your form. Move it inside the loop like this:
    <?php do { ?>
    <tr>
       <td><input name="dag[]" type="text" value="<?php
    echo $row_rsWijzigOpeningsuren['dag']; ?>" size="15" maxlength="15"
    /></td>
       <td><input name="voormiddag[]" type="text" value="<?php echo
    $row_rsWijzigOpeningsuren['voormiddag']; ?>" size="15" maxlength="15"
    /></td>
       <td><input name="namiddag[]" type="text" value="<?php echo
    $row_rsWijzigOpeningsuren['namiddag']; ?>" size="15" maxlength="15"
    /></td>
    </tr>
    <input name="id[]" type="hidden" value="<?php echo $row_rsWijzigOpeningsuren['id']; ?>" />
    <?php } while ($row_rsWijzigOpeningsuren = mysql_fetch_assoc($rsWijzigOpeningsuren)); ?>

  • Inserting multiple records with DW CS3

    I have a page with several input fields:
    input: city1 input: state1
    input: city2 input: state2
    input: city3 input: state3
    input: city4 input: state4
    input: city5 input: state5
    My current sql statement does retrieve the data correctly but
    I can't figure out how to insert 5 new records at once.
    INSERT INTO CS ( CID, Ccity1, Cstate1 ) SELECT
    Contractors.CID, CS.Ccity1, CS.Cstate1
    FROM Contractors INNER JOIN CS ON Contractors.CID = CS.CID
    WHERE (((Contractors.CEmail)='[email protected]'));
    The above values need to go into the table like:
    CID | City | State
    ID1 | city1 | state1
    ID1 | city2 | state2
    ID1 | city3 | state3
    ID1 | city4 | state4
    ID1 | city5 | state5
    I need some help with my insert statement and how to insert
    all my form inputs as I've shown above.

    >I have a page with several input fields:
    >
    > input: city1 input: state1
    > input: city2 input: state2
    > input: city3 input: state3
    > input: city4 input: state4
    > input: city5 input: state5
    >
    > My current sql statement does retrieve the data
    correctly but I can't
    > figure
    > out how to insert 5 new records at once.
    > INSERT INTO CS ( CID, Ccity1, Cstate1 ) SELECT
    Contractors.CID, CS.Ccity1,
    > CS.Cstate1
    > FROM Contractors INNER JOIN CS ON Contractors.CID =
    CS.CID WHERE
    > (((Contractors.CEmail)='[email protected]'));
    >
    > The above values need to go into the table like:
    > CID | City | State
    > ID1 | city1 | state1
    > ID1 | city2 | state2
    > ID1 | city3 | state3
    > ID1 | city4 | state4
    > ID1 | city5 | state5
    >
    > I need some help with my insert statement and how to
    insert all my form
    > inputs
    > as I've shown above.
    You'll need to utilize the Commands implementation... hope
    you're not using
    ASP Classic 'cause it's broken in CS3.

  • How to insert multiple records with a single query?

    Hi,
    I've to save a huge number of installments with their other information such as due on blah blah. Now, I want to add the all of these information at once with a single insert query.
    How can I do that?

    Hi
    What is your source data?
    If the source is external to the SQL Server (like a log file, Excel, CSV, JSON, XML, external application...) you can and should insert it all using Bulk Insert operation.
    Pls clarify what is your source data, and if you need more help using Bulk Insert.
    https://www.simple-talk.com/sql/learn-sql-server/bulk-inserts-via-tsql-in-sql-server/
    http://msdn.microsoft.com/en-us/library/ms188365.aspx
    [Personal Site] [Blog] [Facebook]

  • How to insert a record with date format field

    I tried to execute the query of the below but it showed error and hence i did research and found out i can add a date syntax in front to format it properly.
    INSERT INTO EMP (EmpNo, EmpName, Sex, DateOfBirth, Salary, DeptNo)
    VALUES ('E001', 'Alex', 'M', '2006-11-08', '1500', 'D001');
    When i executed the following query under SQL plus environment, it hang and gave no response. May i know how to solve this problem? Thank you
    INSERT INTO EMP (EmpNo, EmpName, Sex, DateOfBirth, Salary, DeptNo)
    VALUES ('E001', 'Alex', 'M', DATE '2006-11-08', '1500', 'D001');

    Normally when we execute a query, it will show the result or response whether it is fail or success or what the error message is. But my situation is that it showed nothing and no response, and cannot execute new query, i cant do anything under that environment and i can only off it by using end task.

  • Insert Multiple records using Database adapter with Stored procedure func

    Hi All,
    I want to insert multiple records on a database using a stored procedure. I wanted to insert those records using a Database Adapter and the Database adapter should be invoked by a Mediator.
    Can somebody suggest me with ideas whether it can be acheived with OOB capabtilities in SOA suite or not?
    Thanks for your help in advance.
    Thanks,
    Shiv

    The use case you want to achieve is feature supported by the DBAdapter and it is possible to invoke the same from mediator.
    Please have a look at the oracle documentation and you should be able to get the necessary information.
    The below links should help you as well:
    http://download.oracle.com/docs/cd/E15523_01/integration.1111/e10231/adptr_db.htm
    http://blogs.oracle.com/ajaysharma/2011/03/using_file_adapter_database_adapter_and_mediator_component_in_soa_11g.html
    There are some video tutorials as well :)
    http://www.youtube.com/watch?v=dFldS-fDx70 This should also help
    Thanks,
    Patrick

  • MaxDB: Table with many LONG fields does not allow an INSERT: ...?

    Hi,
    I have a table with many LONG fields (28). So far, everythings works fine.
    However, if I add another LONG field I cannot insert a dataset anymore
    (29 LONG fields).
    Does there exist a MaxDB parameter or anything else I can change to make inserts possible again?
    Thanks in advance
    Michael
    appendix:
    - Create and Insert command and error message
    - MaxDB version and its parameters
    Create and Insert command and error message
    CREATE TABLE "DBA"."AZ_Z_TEST02"
         "ZTB_ID"               Integer    NOT NULL,
         "ZTB_NAMEOFREPORT"           Char (400) ASCII DEFAULT '',
         "ZTB_LONG_COMMENT"                LONG ASCII DEFAULT '',
         "ZTB_LONG_TEXTBLOCK_00"         LONG ASCII DEFAULT '',
         "ZTB_LONG_TEXTBLOCK_01"         LONG ASCII DEFAULT '',
         "ZTB_LONG_TEXTBLOCK_02"         LONG ASCII DEFAULT '',
         "ZTB_LONG_TEXTBLOCK_03"         LONG ASCII DEFAULT '',
         "ZTB_LONG_TEXTBLOCK_04"         LONG ASCII DEFAULT '',
         "ZTB_LONG_TEXTBLOCK_05"         LONG ASCII DEFAULT '',
         "ZTB_LONG_TEXTBLOCK_06"         LONG ASCII DEFAULT '',
         "ZTB_LONG_TEXTBLOCK_07"         LONG ASCII DEFAULT '',
         "ZTB_LONG_TEXTBLOCK_08"         LONG ASCII DEFAULT '',
         "ZTB_LONG_TEXTBLOCK_09"         LONG ASCII DEFAULT '',
         "ZTB_LONG_TEXTBLOCK_10"         LONG ASCII DEFAULT '',
         "ZTB_LONG_TEXTBLOCK_11"         LONG ASCII DEFAULT '',
         "ZTB_LONG_TEXTBLOCK_12"         LONG ASCII DEFAULT '',
         "ZTB_LONG_TEXTBLOCK_13"         LONG ASCII DEFAULT '',
         "ZTB_LONG_TEXTBLOCK_14"         LONG ASCII DEFAULT '',
         "ZTB_LONG_TEXTBLOCK_15"         LONG ASCII DEFAULT '',
         "ZTB_LONG_TEXTBLOCK_16"         LONG ASCII DEFAULT '',
         "ZTB_LONG_TEXTBLOCK_17"         LONG ASCII DEFAULT '',
         "ZTB_LONG_TEXTBLOCK_18"         LONG ASCII DEFAULT '',
         "ZTB_LONG_TEXTBLOCK_19"         LONG ASCII DEFAULT '',
         "ZTB_LONG_TEXTBLOCK_20"         LONG ASCII DEFAULT '',
         "ZTB_LONG_TEXTBLOCK_21"         LONG ASCII DEFAULT '',
         "ZTB_LONG_TEXTBLOCK_22"         LONG ASCII DEFAULT '',
         "ZTB_LONG_TEXTBLOCK_23"         LONG ASCII DEFAULT '',
         "ZTB_LONG_TEXTBLOCK_24"         LONG ASCII DEFAULT '',
         "ZTB_LONG_TEXTBLOCK_25"         LONG ASCII DEFAULT '',
         "ZTB_LONG_TEXTBLOCK_26"         LONG ASCII DEFAULT '',
         PRIMARY KEY ("ZTB_ID")
    The insert command
    INSERT INTO AZ_Z_TEST02 SET ztb_id = 87
    works fine. If I add the LONG field
    "ZTB_LONG_TEXTBLOCK_27"         LONG ASCII DEFAULT '',
    the following error occurs:
        Auto Commit: On, SQL Mode: Internal, Isolation Level: Committed
        General error;-7032 POS(1) SQL statement not allowed for column of data type LONG
        INSERT INTO AZ_Z_TEST02 SET ztb_id = 88
    MaxDB version and its parameters
    All db params given by
    dbmcli -d myDB -u dbm,dbm param_directgetall > maxdb_params.txt
    are
    KERNELVERSION                         KERNEL    7.5.0    BUILD 026-123-094-430
    INSTANCE_TYPE                         OLTP
    MCOD                                  NO
    RESTART_SHUTDOWN                      MANUAL
    SERVERDBFOR_SAP                     YES
    _UNICODE                              NO
    DEFAULT_CODE                          ASCII
    DATE_TIME_FORMAT                      INTERNAL
    CONTROLUSERID                         DBM
    CONTROLPASSWORD                       
    MAXLOGVOLUMES                         10
    MAXDATAVOLUMES                        11
    LOG_VOLUME_NAME_001                   LOG_001
    LOG_VOLUME_TYPE_001                   F
    LOG_VOLUME_SIZE_001                   64000
    DATA_VOLUME_NAME_0001                 DAT_0001
    DATA_VOLUME_TYPE_0001                 F
    DATA_VOLUME_SIZE_0001                 64000
    DATA_VOLUME_MODE_0001                 NORMAL
    DATA_VOLUME_GROUPS                    1
    LOG_BACKUP_TO_PIPE                    NO
    MAXBACKUPDEVS                         2
    BACKUP_BLOCK_CNT                      8
    LOG_MIRRORED                          NO
    MAXVOLUMES                            22
    MULTIO_BLOCK_CNT                    4
    DELAYLOGWRITER                      0
    LOG_IO_QUEUE                          50
    RESTARTTIME                         600
    MAXCPU                                1
    MAXUSERTASKS                          50
    TRANSRGNS                           8
    TABRGNS                             8
    OMSREGIONS                          0
    OMSRGNS                             25
    OMS_HEAP_LIMIT                        0
    OMS_HEAP_COUNT                        1
    OMS_HEAP_BLOCKSIZE                    10000
    OMS_HEAP_THRESHOLD                    100
    OMS_VERS_THRESHOLD                    2097152
    HEAP_CHECK_LEVEL                      0
    ROWRGNS                             8
    MINSERVER_DESC                      16
    MAXSERVERTASKS                        20
    _MAXTRANS                             288
    MAXLOCKS                              2880
    LOCKSUPPLY_BLOCK                    100
    DEADLOCK_DETECTION                    4
    SESSION_TIMEOUT                       900
    OMS_STREAM_TIMEOUT                    30
    REQUEST_TIMEOUT                       5000
    USEASYNC_IO                         YES
    IOPROCSPER_DEV                      1
    IOPROCSFOR_PRIO                     1
    USEIOPROCS_ONLY                     NO
    IOPROCSSWITCH                       2
    LRU_FOR_SCAN                          NO
    PAGESIZE                            8192
    PACKETSIZE                          36864
    MINREPLYSIZE                        4096
    MBLOCKDATA_SIZE                     32768
    MBLOCKQUAL_SIZE                     16384
    MBLOCKSTACK_SIZE                    16384
    MBLOCKSTRAT_SIZE                    8192
    WORKSTACKSIZE                       16384
    WORKDATASIZE                        8192
    CATCACHE_MINSIZE                    262144
    CAT_CACHE_SUPPLY                      1632
    INIT_ALLOCATORSIZE                    229376
    ALLOW_MULTIPLE_SERVERTASK_UKTS        NO
    TASKCLUSTER01                       tw;al;ut;2000sv,100bup;10ev,10gc;
    TASKCLUSTER02                       ti,100dw;30000us;
    TASKCLUSTER03                       compress
    MPRGN_QUEUE                         YES
    MPRGN_DIRTY_READ                    NO
    MPRGN_BUSY_WAIT                     NO
    MPDISP_LOOPS                        1
    MPDISP_PRIO                         NO
    XP_MP_RGN_LOOP                        0
    MP_RGN_LOOP                           0
    MPRGN_PRIO                          NO
    MAXRGN_REQUEST                        300
    PRIOBASE_U2U                        100
    PRIOBASE_IOC                        80
    PRIOBASE_RAV                        80
    PRIOBASE_REX                        40
    PRIOBASE_COM                        10
    PRIOFACTOR                          80
    DELAYCOMMIT                         NO
    SVP1_CONV_FLUSH                     NO
    MAXGARBAGECOLL                      0
    MAXTASKSTACK                        1024
    MAX_SERVERTASK_STACK                  100
    MAX_SPECIALTASK_STACK                 100
    DWIO_AREA_SIZE                      50
    DWIO_AREA_FLUSH                     50
    FBM_VOLUME_COMPRESSION                50
    FBM_VOLUME_BALANCE                    10
    FBMLOW_IO_RATE                      10
    CACHE_SIZE                            10000
    DWLRU_TAIL_FLUSH                    25
    XP_DATA_CACHE_RGNS                    0
    DATACACHE_RGNS                      8
    XP_CONVERTER_REGIONS                  0
    CONVERTER_REGIONS                     8
    XP_MAXPAGER                           0
    MAXPAGER                              11
    SEQUENCE_CACHE                        1
    IDXFILELIST_SIZE                    2048
    SERVERDESC_CACHE                    73
    SERVERCMD_CACHE                     21
    VOLUMENO_BIT_COUNT                    8
    OPTIM_MAX_MERGE                       500
    OPTIM_INV_ONLY                        YES
    OPTIM_CACHE                           NO
    OPTIM_JOIN_FETCH                      0
    JOIN_SEARCH_LEVEL                     0
    JOIN_MAXTAB_LEVEL4                    16
    JOIN_MAXTAB_LEVEL9                    5
    READAHEADBLOBS                      25
    RUNDIRECTORY                          E:\_mp\u_v_dbs\EVERW_C5
    _KERNELDIAGFILE                       knldiag
    KERNELDIAGSIZE                        800
    _EVENTFILE                            knldiag.evt
    _EVENTSIZE                            0
    _MAXEVENTTASKS                        1
    _MAXEVENTS                            100
    _KERNELTRACEFILE                      knltrace
    TRACE_PAGES_TI                        2
    TRACE_PAGES_GC                        0
    TRACE_PAGES_LW                        5
    TRACE_PAGES_PG                        3
    TRACE_PAGES_US                        10
    TRACE_PAGES_UT                        5
    TRACE_PAGES_SV                        5
    TRACE_PAGES_EV                        2
    TRACE_PAGES_BUP                       0
    KERNELTRACESIZE                       648
    EXTERNAL_DUMP_REQUEST                 NO
    AKDUMP_ALLOWED                      YES
    _KERNELDUMPFILE                       knldump
    _RTEDUMPFILE                          rtedump
    UTILITYPROTFILE                     dbm.utl
    UTILITY_PROTSIZE                      100
    BACKUPHISTFILE                      dbm.knl
    BACKUPMED_DEF                       dbm.mdf
    MAXMESSAGE_FILES                    0
    EVENTALIVE_CYCLE                    0
    _SHAREDDYNDATA                        10280
    _SHAREDDYNPOOL                        3607
    USE_MEM_ENHANCE                       NO
    MEM_ENHANCE_LIMIT                     0
    __PARAM_CHANGED___                    0
    __PARAM_VERIFIED__                    2008-05-13 13:47:17
    DIAG_HISTORY_NUM                      2
    DIAG_HISTORY_PATH                     E:\_mp\u_v_dbs\EVERW_C5\DIAGHISTORY
    DIAGSEM                             1
    SHOW_MAX_STACK_USE                    NO
    LOG_SEGMENT_SIZE                      21333
    SUPPRESS_CORE                         YES
    FORMATTING_MODE                       PARALLEL
    FORMAT_DATAVOLUME                     YES
    HIRES_TIMER_TYPE                      CPU
    LOAD_BALANCING_CHK                    0
    LOAD_BALANCING_DIF                    10
    LOAD_BALANCING_EQ                     5
    HS_STORAGE_DLL                        libhsscopy
    HS_SYNC_INTERVAL                      50
    USE_OPEN_DIRECT                       NO
    SYMBOL_DEMANGLING                     NO
    EXPAND_COM_TRACE                      NO
    OPTIMIZE_OPERATOR_JOIN_COSTFUNC       YES
    OPTIMIZE_JOIN_PARALLEL_SERVERS        0
    OPTIMIZE_JOIN_OPERATOR_SORT           YES
    OPTIMIZE_JOIN_OUTER                   YES
    JOIN_OPERATOR_IMPLEMENTATION          IMPROVED
    JOIN_TABLEBUFFER                      128
    OPTIMIZE_FETCH_REVERSE                YES
    SET_VOLUME_LOCK                       YES
    SHAREDSQL                             NO
    SHAREDSQL_EXPECTEDSTATEMENTCOUNT      1500
    SHAREDSQL_COMMANDCACHESIZE            32768
    MEMORY_ALLOCATION_LIMIT               0
    USE_SYSTEM_PAGE_CACHE                 YES
    USE_COROUTINES                        YES
    MIN_RETENTION_TIME                    60
    MAX_RETENTION_TIME                    480
    MAX_SINGLE_HASHTABLE_SIZE             512
    MAX_HASHTABLE_MEMORY                  5120
    HASHED_RESULTSET                      NO
    HASHED_RESULTSET_CACHESIZE            262144
    AUTO_RECREATE_BAD_INDEXES             NO
    LOCAL_REDO_LOG_BUFFER_SIZE            0
    FORBID_LOAD_BALANCING                 NO

    >
    Lars Breddemann wrote:
    > Hi Michael,
    >
    > this really looks like one of those "Find-the-5-errors-in-the-picture" riddles to me.
    > Really.
    >
    > Ok, first to your question: this seems to be a bug - I could reproduce it with my 7.5. Build 48.
    > Anyhow, when I use
    >
    > insert into "AZ_Z_TEST02"  values (87,'','','','','','','','','','','','','','','',''
    >                                           ,'','','','','','','','','','','','','','','','')
    >
    > it works fine.
    It solves my problem. Thanks a lot. -- I hardly can believe that this is all needed to solve the bug. This may be the reason why I have not given it a try.
    >
    Since explicitely specifying all values for an insert is a good idea anyhow (you can see directly, what value the new tupel will have), you may want to change your code to this.
    >
    > Now to the other errors:
    > - 28 Long values per row?
    > What the heck is wrong with the data design here?
    > Honestly, you can save data up to 2 GB in a BLOB/CLOB.
    > Currently, your data design allows 56 GB per row.
    > Moreover 26 of those columns seems to belong together originally - why do you split them up at all?
    >
    > - The "ZTB_NAMEOFREPORT" looks like something the users see -
    > still there is no unique constraint preventing that you get 10000 of reports with the same name...
    You are right. This table looks a bit strange. The story behind it is: Each crystal report in the application has a few textblocks which are the same for all the e.g. persons the e.g. letter is created for. Principally, the textblocks could be directy added to the crystal report. However, as it is often the case, these textblocks may change once in a while. Thus, I put the texts of the textblock into this "strange" db table (one row for each report, one field for each textblock, the name of the report is given by "ztb_nameofreport"). And the application offers a menue by which these textblocks can be changed. Of course, the fields in the table could be of type CHAR, but LONG has the advantage that I do not have to think about the length of the field, since sometime the texts are short and sometimes they are really long.
    (These texts would blow up the sql select command of the crystal report very much if they were integrated into the this select command. Thus it is realized in another way: the texts are read before the crystal report is loaded, then the texts are "given" to the crystal report (by its parameters), and finally the crystal report is loaded.)
    >
    - MaxDB 7.5 Build 26 ?? Where have you been the last years?
    > Really - download the 7.6.03 Version [here|https://www.sdn.sap.com/irj/sdn/maxdb-downloads] from SDN and upgrade.
    > With 7.6. I was not able to reproduce your issue at all.
    The customer still has Win98 clients. MaxDB odbc driver 7.5.00.26 does not work for them. I got the hint to use odbc driver 7.3 (see [lists.mysql.com/maxdb/25667|lists.mysql.com/maxdb/25667]). Do MaxDB 7.6 and odbc driver 7.3 work together?
    All Win98 clients may be replaced by WinXP clients in the near future. Then, an upgrade may be reasonable.
    >
    - Are you really putting your data into the DBA schema? Don't do that, ever.
    > DBM/SUPERDBA (the sysdba-schemas) are reserved for the MaxDB system tables.
    > Create a user/schema for your application data and put your tables into that.
    >
    > KR Lars
    In the first MaxDB version I used, schemas were not available. I haven't changed it afterwards. Is there an easy way to "move an existing table into a new schema"?
    Michael

  • Inserting multiple records in to database table using webdynpro abap

    Hi all,
    I have created a username inputfield,a button and a table
    with one coloumn.
    If i enter  names in the input field then the values should be
    displayed in that table.
    Even i have got the answer i am not able to insert
    the values in to database(ztable) table.
    i.e. only one value(1st) was inserted the second value was
    not inserted ....
    so kindly send me the coding to insert multiple records
    into the database table......
    by,
    ranjith

    hi Ranjith,
    If you want to insert multiple records from the webdynpro view table to database table then try the following code.
    DATA lo_nd_tablenode TYPE REF TO if_wd_context_node.
      DATA lo_el_tablenode TYPE REF TO if_wd_context_element.
      DATA ls_tablenode TYPE wd_this->element_tablenode.
      DATA it_tablenode LIKE STANDARD TABLE OF ls_tablenode.
      navigate from <CONTEXT> to <tablenode> via lead selection
      lo_nd_tablenode = wd_context->get_child_node( name = wd_this->wdctx_tablenode ).
      get element via lead selection
      lo_el_tablenode = lo_nd_tablenode->get_element(  ).
      get all declared attributes
      lo_nd_tablenode->get_static_attributes_table(
      IMPORTING
        table = it_tablenode ).
    MODIFY databasetablename FROM TABLE  it_tablenode.
    here it_tablenode is the internal table which holds the value from webdynpro view..
    Regards,
    Shamila.

  • Inserting multiple records in JSP and setting date format

    Hi,
    I'm looking at the possibilities for using JSP's as a web application.
    I've got a few questions about it:
    1) Is it possible to insert multiple records in the detail block of my JSP. Normally when I click the 'insert button', an insert JSP comes up, which is a html form with the possiblity of inserting only one record.
    2) Is it possible to change the format of a date field. Now a date field is displayed as 'YYYY-MM-DD'. My nls_date_format is something else.
    3) I can't get the static combo box working for the class EditCurrentRecord. The normal use combo box is no problem. Probably, I don't have the syntax correct. Could anyone provide an example for this.

    2) Just use the Calendar object. You can format the date any way you want. I am assuming that you are talking about how the date appears after a .toString() call.
    Here is how I do it (this code will probably look very bad I am trying to type into a very small space so bear with me):
    public static String traceDate(java.sql.Timestamp dt)
    try
    if (dt == null)
    return " ";
    else
    Calendar clFmt = Calendar.getInstance();
    clFmt.setTime(dt);
    return
    String.valueOf(clFmt.get(Calendar.MONTH) + 1) + "/" +
    String.valueOf(clFmt.get(Calendar.DAY_OF_MONTH)) + "/" +
    String.valueOf(clFmt.get(Calendar.YEAR)) + " " +
    String.valueOf( (clFmt.get(Calendar.HOUR) == 0) ? 12 : clFmt.get(Calendar.HOUR) ) + ":" +
    padLt(String.valueOf(clFmt.get(Calendar.MINUTE)),2) + ":" +
    padLt(String.valueOf(clFmt.get(Calendar.SECOND)),2) + " " +
    (clFmt.get(Calendar.AM_PM) == Calendar.AM ? "AM" : "PM");
    catch (Exception e)
    throw new RuntimeException(e.getMessage());
    (padLt is a custom function that just pads 0s to the left of the number)

  • ORA-01654 error message when inserting multiple records

    Hello all,
    I have a Test table with attributes TEST_ID, TEST_NAME, TEST_DATE, STATUS, and want to insert multiple records into this table based on user input form. If user select a value from the drop down list, and the number of records to insert into the Test table, the application should insert that many into the Test table with the same TEST_DATE, STATUS, but TEST_NAME should be the drop down list value + i (1....the number of inserted records). I manually created the form, and wrote a sql for the process.
    For example if the user select MUSIC, 3 then data should look like this
    TEST_ID TEST_NAME TEST_DATE STATUS
    1 MUSIC1 04/06/2010 Y
    2 MUSIC2 04/06/2010 Y
    3 MUSIC3 04/06/2010 Y
    I got the error ORA-01654: unable to extend index TEST_TOOL_ID.TEST_PK by 128 in table space FLOW_13120862905990037739.
    The process query
    DECLARE IDTEST NUMBER := 1;
    BEGIN
    WHILE (IDTEST < :P1_COUNT + 1) LOOP
    INSERT INTO TEST ( TEST_NAME, TEST_DATE, STATUS )
    VALUES ((:P1_TEST_NAME || ' ' ||IDTEST), SYSDATE, 'Y');
    END LOOP;
    END;
    Here is the link to this application
    http://apex.oracle.com/pls/apex/f?p=4000:1:3173416575551580::NO:RP:FB_FLOW_ID,F4000_P1_FLOW:32828,32828
    Any help would be appreciated.
    Thanks,
    Karoline

    This is the output i get when i change the getMessage with printStackTrace.
    String getMessage() replaced with printStackTrace:
    G:\studies\Chapter11\MakeDB.java:33: 'void' type not allowed here
                   System.out.println("Could not drop primary key on UserStocks table: "
    ^
    G:\studies\Chapter11\MakeDB.java:43: 'void' type not allowed here
                   System.out.println("Could not drop UserStocks table: "
    ^
    G:\studies\Chapter11\MakeDB.java:54: 'void' type not allowed here
                   System.out.println("Could not drop Users table: "
    ^
    G:\studies\Chapter11\MakeDB.java:64: 'void' type not allowed here
                   System.out.println("Could not drop Stocks table: "
    ^
    G:\studies\Chapter11\MakeDB.java:83: 'void' type not allowed here
                   System.out.println("Exception creating Stocks table: "
    ^
    G:\studies\Chapter11\MakeDB.java:102: 'void' type not allowed here
                   System.out.println("Exception creating Users table: "
    ^
    G:\studies\Chapter11\MakeDB.java:119: 'void' type not allowed here
                   System.out.println("Exception creating UserStocks table: "
    ^
    G:\studies\Chapter11\MakeDB.java:133: 'void' type not allowed here
                   System.out.println("Exception creating UserStocks index: "
    ^
    G:\studies\Chapter11\MakeDB.java:159: 'void' type not allowed here
                   System.out.println("Exception inserting user: "
    ^
    9 errors
    Tool completed with exit code 1

  • Inserting multiple records into a database from a table

    I have a dynamic table with rows upto 10. i am trying to insert all the records in these rows into a database ( msaccess)
    table name: Table1 ( in my form )
    Database table : movies_comments ( as posted in stefan's forums ).
    table columns: username, movieid, comments
    i am using the following code.
    Database.ExecSQL() function is as posted in stefcamerons forums.
    var tlength = xfa.resolveNode("form1.#subform[0].Table1.Row1[*]").length;
    xfa.host.messageBox("tlength is :" +tlength);
    for ( var i = 1; i <= tlength; i++)
    var username = xfa.resolveNode("form1.#subform[0].Table1.Row1["+i+"].user_name").rawValue;
    var movieID = xfa.resolveNode("form1.#subform[0].Table1.Row1["+i+"].movie_id").rawValue;
    var commentS = xfa.resolveNode("form1.#subform[0].Table1.Row1["+i+"].comment_").rawValue;
    Database.ExecSQL("INSERT INTO movie_comments (username, movieId, comment) VALUES ('username','movieID', 'commentS');");
    i am trying to insert multiple records using the code above. But i am getting error
    GeneralError: Operation failed.
    XFAObject.resolveNode:1:XFA:form1[0]:#subform[0]:Button1[0]:click
    SOM expression returned list when single result was expected
    suggest me an alternate way to insert multiple records from a table into a database.
    thank Q

    figured it out. I changed the ...OR (alternative names = colname) in the recordset to ...OR (alternative names LIKE %colname%). Works like a charm now- the result of a good night's sleep.

  • Insert multiple record Oracle forms 6i/9i/10g

    Hi,
    how can i insert multiple record using a tabular view in oracle form,
    do i have to use for loop?
    can someone help me? i've kindda stuck in this problem..
    scenario:
    i have 5 display of last_name text_item and i put 4 names on it..
    if i use insert into, it only get the 4th name i putted..
    question:
    how can i put them all together?

    Hi Vansul,
    for example, let us use the field name last_name on the employees table
    and we have text_item named text_last_name that has been displayed 4 times.
    and i will put 4 names on it.
    last name
    brown
    marco
    lester
    king
    when i click the submit button, it will only get the last_name king.
    now the question is how can i insert them all in my table?
    my PL/SQL in my submit button is
    begin
    insert into employees
    +(last_name)+
    values(:blk_emp.text_last_name);
    standard.commit;
    end;
    any help? I really need to solve this one.
    Edited by: Nelzki on Jan 26, 2012 1:59 AM

  • Databse of 1888 Byte Per Record with 259 Fixed Fields Stumped CR?!?

    My Database of  15 million records/rows at 1888 Byte Per Record with 259 Fixed Fields STUMPED CR?!
    Executive Summary :
    I have lots of data. There are 15 million of records in some of my database files. But I need to drill into the data and get counts for each field.
    I need to know how many times each data field (row) is populated in a database file. For example,  how many of my records have last name? how many have first name? date of birth? etc.  I need a simple report made using SAP "Crystal Reports 2011" Workstation type edition that SUMS each data  row into a single column output like csv.
    My database sizes can range from 1,000 to 18 million records that are in fixed field asci format with 1888 bytes and 256 rows per record!  The report  needs to SUM each data field or, in the case of a data field with a minimum of twelve tables, SUM each value of a table.
    My contracted CR programmer is an expert although she was new to data files this humongous. Can anyone here help us get CR to work on my data? Here was her conclusion, Crystal Reports Fail:
    My file is 14.1 gb  as well. However, when run through Crystal Reports, it
    only returns 2,274,876 records. Therefore, I am going to assume that there
    is a Record Limit for Text files of this. I searched through all the
    registry settings and there is nothing that appears to be limiting it. I
    went online for a while to see if there was any information on it, and just
    like when I used to work there, there was nothing concrete. Business Objects
    does not physically test this large of data retrieval, therefore they don't
    know the exact record limits.
    I'm not sure what to suggest, but I don't think Crystal Reports is going to
    work for you and I wouldn't have known that from the beginning without
    testing your data. I'm 99% sure there is a refund policy on the software, so
    you shouldn't have any issues returning it.
    Since I only specialize in Crystal Reports, I'm not sure what other software
    can handle this amount of data. Possibly Cognos, but you may want to find
    out from them or do some research.
    If your data were in a database that can run stored procedures (like SQL
    Server or Oracle) then you could write SQL to only return the counts. Then
    when Crystal connected to the stored procedure, it should work, but I can't
    say for sure without testing it. And I don't have SQL Server or Oracle
    installed on my machine. I believe MYSQL (the free version) has a limit to
    the number of records it can hold and I'm sure 8 million would be over the
    limit. Also, I'm not sure if it supports stored procedures. I have used it
    once before and found it extremely cumbersome and limited. I think SQL
    Server and Oracle are quite pricey, so I don't think that this will even be
    an option for you.

    Hi Shawn,
    I actually contacted the same person you did also. Summer was a Report Designer Resource here and knows her stuff and the Report Designer as much as our Developer who wrote it do.
    As I suggested in my first reply is to get all that data into a real database, one that can run Stored Procedures to do all the crunching unfortunately is the only way I can see this ever working.
    Windows 7 and 8 CPU's doesn't help, 64 bit may but the problem is CR Designer is a 32 bit application so it can't take advantage of the 64 bit memory addressing space.
    What you could so is post your question to the forum:
    [Business Decision Making with BI|Marketing Library;
    This is a forum for managers or anyone who wants to have a non-technical discussion about making informed decisions with analytics tools. Ask questions and share your experiences on how to effectively utilize data to address real business problems. Experts from inside and outside SAP will be monitoring these conversations and offering their knowledge along with the broader community.
    Someone in there may have another SAP product that might be able to load your flat file into a data tool that CR can report off of.
    I still think a copy of MS SQL 2008 Express is your best and likely cheapest solution and then you can simply import the data into it which it has an Import Wizard that makes it relatively easy to do... Although you may have to break your file into pieces for it to be able to process also.
    You need to be flexible on that data source, I doubt you'll find anything that can report off of that huge of text file.
    Good luck
    Don

  • Adding Multiple Records with Express

    Hello All,
    We have a CRUD application written in Express 2.0 that allows users to
    enter part numbers and associated information. Our part numbers are
    structured as a prefix, alpha, suffix and 'M' or 'P' number variations :
    1 AB 2 P3 for example. We have provided functionality to allow the
    user to enter multiple P or M variations all at once, say 1 AB 2 P1 thru
    P100,
    using a dialog box where they enter the starting number, ending number
    and step.
    The problem comes in the AddRecordsToSave method.
    This method correctly builds the array of BusinessClass needed to be
    passed to the Save method, however, the Save method adds only the
    initial record (the one from the original Express data entry screen)
    to the database.
    I have traced the problem to the BusinessClient.Update method called
    from
    Save. I believe I am missing some query information that should be
    built into
    AddRecordsToSave, but I am completely unsure of how to provide this.
    As you can see in the attached code, we are using the LogAttr method to
    post
    changes. Apparently this is not enough. What am I missing here?
    The InstanceStatus key of the added records is set to ST_EMPTY by
    default....
    I have tried forcing this to ST_UPDATE, only to receive an error that it
    should
    be ST_EMPTY......?? I am confused. If anyone can shed some light on this
    for me,
    I would appreciate it. Thanks for any help.
    Scott Guman E-mail: [email protected]
    IRM Analyst II Phone: (610) 709-2144
    Mack Trucks, Inc. Fax: (610) 709-4713
    Allentown, PA 18105

    Hi There,
    If attr is not specified in your LogAttr() call, the
    BusinessClass
    will be put in the update state but not attributes will
    be logged.
    That may be the reason why only the displayed record(
    fetched from
    the DB ) is getting logged, but not the new records.
    I think you should use ATTR_SIMPLE with LogAttr. This
    will cause
    all the attributes to be logged and a proper query to
    be built
    to insert the newly created record. I am no Express
    Guru,
    but it works fine for me. Also, try not to modify
    InstanceStatus directly.
    Sometimes it might lead to inconsistencies. The online
    help
    The Add Records to Save example really helps.
    Good luck!
    Ajith Kallambella. M.
    Forte Systems Engineer,
    International Business Corporation
    -----Original Message-----
    From: Scott Guman [SMTP:[email protected]]
    Sent: Wednesday, September 16, 1998 9:34 AM
    To: 'Forte Users'
    Subject: Adding Multiple Records with Express
    Hello All,
    We have a CRUD application written in Express 2.0 that
    allows users to
    enter part numbers and associated information. Our
    part numbers are
    structured as a prefix, alpha, suffix and 'M' or 'P'
    number variations :
    1 AB 2 P3 for example. We have provided functionality
    to allow the
    user to enter multiple P or M variations all at once,
    say 1 AB 2 P1 thru
    P100,
    using a dialog box where they enter the starting
    number, ending number
    and step.
    The problem comes in the AddRecordsToSave method.
    This method correctly builds the array of BusinessClass
    needed to be
    passed to the Save method, however, the Save method
    adds only the
    initial record (the one from the original Express
    data entry screen)
    to the database.
    I have traced the problem to the BusinessClient.Update
    method called
    from
    Save. I believe I am missing some query information
    that should be
    built into
    AddRecordsToSave, but I am completely unsure of how to
    provide this.
    As you can see in the attached code, we are using the
    LogAttr method to
    post
    changes. Apparently this is not enough. What am I
    missing here?
    The InstanceStatus key of the added records is set to
    ST_EMPTY by
    default....
    I have tried forcing this to ST_UPDATE, only to receive
    an error that it
    should
    be ST_EMPTY......?? I am confused. If anyone can shed
    some light on this
    for me,
    I would appreciate it. Thanks for any help.
    Scott Guman E-mail:
    [email protected]
    IRM Analyst II Phone: (610) 709-2144
    Mack Trucks, Inc. Fax: (610) 709-4713
    Allentown, PA 18105
    << File: AddRecordsToSave.txt >>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • Insert multiple records into a table(Oracle 9i) from a single PHP statement

    How can I insert multiple records into a table(Oracle 9i) from a single PHP statement?
    From what all I've found, the statement below would work if I were using MySQL:
         insert into scen
         (indx,share,expire,pitch,curve,surface,call)
         values
         (81202, 28, 171, .27, 0, 0, 'C' ),
         (81204, 28, 501, .25, 0, 0, 'C' ),
         (81203, 17, 35, .222, 0, 0, 'C' ),
         (81202, 28, 171, .27, 2, 0, 'C' ),
         (81204, 28, 501, .20, 0, 1, 'C' ),
         (81203, 28, 135, .22, 1, 0, 'C' )
    The amount of records varies into the multiple-dozens. My aim is to utilize the power of Oracle while avoiding the i/o of dozens of single-record inserts.
    Thank you,
    Will

    You could look at the INSERT ALL statement found in the documentation here:
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_913a.htm#2133161
    My personal opinion is that you probably won't see any benefit because under the hood I think Oracle will still be doing single row inserts. I could be wrong though.
    The only way to confirm was if you did a test of multiple inserts vs an INSERT ALL, that is if the INSERT ALL met your requirements.
    HTH.

Maybe you are looking for