How to update more than one records at one time

hello guys..
how to update a few records (more than one) with different
IDs at the same time? i tried to make a query like this (see
below), but only one record (more than one data in the same
field)has been updated.
<cfquery name="rec" datasource="DatKoku">
select *
from tbl_pilih
where id_pel = '#form.idpel#'
</cfquery>
<cfquery name="updtrecord" datasource="DatKoku">
update tbl_pilih
set
kptsn = '#form.suk_pil#',
trkh_kptsn =
'#Dateformat(TodayDate,"dd/mm/yy")#|#TimeFormat(Now(),"hh:mm:ss
tt")#'
where id_pel = '#rec.id_pel#'
</cfquery>
<cfquery name="outputrecord" datasource="DatKoku">
select *
from tbl_pilih
where id_pel = '#form.idpel#'
</cfquery>

Take the query,
<cfquery name="rec" datasource="DatKoku">
select *
from tbl_pilih
where id_pel = '#form.idpel#'
</cfquery>
If every row in the table has a distinct id_pel, then what
you ask is actually an impossible question. It will have no answer.
Distinct IDs imply that the resultset will contain
at most one distinct value of id_pel. That means, there can
be at most one row that satisfies the condition,
where id_pel = '#rec.id_pel#' in the update query. That in
turn means the update query can update at most one row at a time.
If, however, the resultset of
rec consists of multiple rows, it will mean that there are
multiple rows in the table that have the same
id_pel . Then, your update query,
updtrecord, should update all the rows that share that value
of id_pel.

Similar Messages

  • How to save more than 2 records at a time in tabular form?

    I have a table name SAMPLE_TABLE, which has SNO,NAME items and one sequence name is SEQ_SAMPLE.
    i have one form based on SAMPLE_TABLE. my form is in tabular format, which has 5 records.
    in the layout wizard only NAME is displayed. SNO doesnot displayed.
    in the layout wizard, there is one push button named as SAVE.
    the code of SAVE button(When_Button_Pressed) is
    insert into sample_table values(seq_sample.nextval,:sample_table.name);
    clear_record;
    commit;
    my problem is :
    when ever i want to save one record at a time there is no problem.
    if i want to save more than 2 records at a time then sequence number is alloted for last record. other records have no sequence numbers.
    for example i want to insert 2 names as XYZ,PQR then
    the table look like this:
    sno name
    1 PQR
    XYZ
    if SNO is primary key then it doesnot work because of null value.
    can any one solve my problem?
    Thanks
    Meegada

    Is the block a database block or a control block,
    1. if database block, assign the primary key on a
    trigger like new record instance for each record
    enteredour's is a control block, ididnt get your point clearly
    could you make it clear how to assign a primary key on a trigger
    our criteria is we are having two block as lov_values and lov_name
    lov_values:
    lov_values_id (sequence generated)
    lov_id will be same for the all the values for a particular lov_name
    lov_values will be which we enter in the form which will be the only visuble colums on the form
    lov_name block:
    lov_name
    lov_id(sequence generated)
    could you help me with the code
    thanks
    prasad

  • How to update more than one table using EO

    Hi frnds,
    Can someone provide me a doc/link which explain in detail how we can we update more than one PL/SQL tables using entity objects(on which VOs are based).
    Till date I have been doing this using PL/SQL procedures but now my requirement is to achieve it thru EO.Someone suggested me use VL to achieve plz help
    Thanks & Regards,

    Hi,
    That would be very nice of you,plz send me the docs and also send me similar docs that would be beneficial for a beginner like me.
    My id is [email protected]
    Thnx for your time.

  • How to delete more than 1 contact at a time

    I need to know ASAP how to delete more than one contact at a time

        Hello grams4crew!
    I can definitely help you in deleting more than one contact at a time, no problem! I hope you're enjoying your Galaxy S5!
    You can delete a single contact, or choose multiple contacts
    to delete.
    1. From the Home screen, tap Contacts.
    2. Touch and hold on a contact to select it. You can also
    tap other contacts, or choose Select all to select all
    contacts.
    3. Tap Delete, and then tap OK to confirm.
    We have a page for our customers to get the user guides for their devices: http://vz.to/1oMIe2y
    I hope this helps!
    Thank you,
    ChristinaB_VZW
    VZW Support
    Follow us on Twitter @VZWSupport

  • How to open more than 1 file at a time in PSE12?

    How do you set PSE12 to open more than 1 file (jpg) at a time? I've seen this question come up many times but no one seems to get the problem resolved. I've tried all the suggestions. Any assistance appreciated.
    I had this program installed and working as I wanted about 3 months ago. I then uninstalled and reinstalled a few days ago. Now it won't open more than 1 file at a time.

    Hi,
    My theory is that Windows get confused when it is opening the program file and the following intsructions should create a unique copy. I have produced the instructions in detail because I am never sure how much people are use to - forgive me you know much of it.
    Open Windows or Folder Explorer
    Navigate to C:\Program Files (x86)\Adobe\Photoshop Elements 12
    Look for PhotoshopElementsEditor.exe
    Right click on the file and select Copy
    Right click on a blank space and select Paste - you should get a prompt asking if you want to continue - you do - this should produce a copy of the file
    Rename PhotoshopElementsEditor - Copy.exe to PSE 12 ED  - you should get a prompt asking if you want to continue - you do
    Close the Explorer
    In the Windows Control Panel, select Default Programs
    In Default Programs, Select Associate a file type … - it will take a while to display the list
    Scroll down to the type you want to select - say .jpg and select it
    Click on the Change program button
    Click on the Browse button
    Search for the PSE 12 ED file renamed in 6 above, select it and then click on the Open button
    Click on OK and close the Default Programs
    Now try your tests. I can get multiple files to open as well as retain Expert mode.
    Good luck
    Brian

  • Mass transport: how to select more than 7 roles at a time

    I have about 50 roles I need to transport.  I would like to use mass transport, but when I select all 50 roles, only the first 7 are actually added to the transport list. 
    I have to repeat the selection many times before all the roles are included in my transport request.. still a rather time consuming process.  How can I select more than 7 at a time?

    > And now we're back to my original problem. 
    Oh, dear....
    > We have a structured role naming convention that would make it very easy to select with wildcards.. however, when I try to do it that way, the system won't let me select more than 8 roles at a time.
    This is where I think you do not have a problem but a misunderstanding. Never mind, we see those quite often.
    > See if you can reproduce this problem in your environment:
    I had to start it first (minisap Nw2004), renew the license and wait for the transport tool to compile. You've got me busy here on a saturday
    > 1. Start PFCG
    done
    > 2. Utilities -> Mass Transport
    yep, watched it compile.
    > 3. Click multiple selection button
    yep
    > 4. Enter a mask that would match more than 8 roles,
    yep
    > press F4
    NO! NO! NO! NO! NO! NO! NO! NO! NO! NO!
    This is where the misunderstanding starts
    > 5. Click select all (make sure more than 8 roles are selected)
    No
    > 6. Click copy button
    No
    > 7. Observe that only the first 8 role are actually copied to the multiple selection list
    Instead, hit F8 where you have hit F4 and find out all roles that fit the mask will be entered into the transport.
    You have mixed up the actual report selection and the search functionality of the selection screen. Play with it, it's fun.
    One word of caution: Mass transport can cause perfromance problems and errors. I always try not to enter more than 500 roles into a transport at a time.
    Cheers!
    Jurjen

  • How to update more than one Bank data in LSMW using recording

    Hi friends,
    please let me know how can we upload more than one bank data for vendore master in LSMW, and i am Using Recording and i have to use that.
    thanks a lot.
    Regards,
    veeru.

    Hi
    I have used the direct input but, there are address fields missing in the direct input like, SORT2, MOB_NUMBER, SMTP_ADDR. these fields.
    when i see the documentation for direct input, it says for additional address you need to use another BAPI. but here the problem is we are using internal numbering for vendor, so how to link the created vendor and the address uploaded to correct vendor.
    thanks a lot,.

  • More than 1 records in one cell

    Hi all,
    I once came across someone's apex site whereby they've a form and one column contains more than one record.
    for e.g.
    customer1 ordered prducts abc, xyz, def, etc
    customer2 ordered one product xyz
    The form:
    Name  |Address |Product
          |        |def
          |        |---------------------
    Cust1 |34289   |xyz
          |        |---------------------
          |        |abc
    cust2 |43418   |xyz
    -------------------------------------instead of
    Name  |Address |Product
    Cust1 |34289   |xyz
    Cust1 |34289   |def
    Cust1 |34289   |abc
    cust2 |43418   |xyz
    -------------------------------------If anyone have come across this, pls guide me.
    Kind regards
    Mel
    Edited by: daygocks on Jun 4, 2009 5:26 PM

    ok, now its clear what exactly you need. In apex term it is called as Break Formatting for columns. Create a normal report
    SELECT Name,Address ,product
    FROM TABLE_TNow go to the Report attribute and make sure that the NAME and ADDRESS columns are the first and second column in the report. You can change the order of the column by using the up down arrow key on the right. Scroll down to the section "Break Formatting" and select "First and Second Columns" under the Breaks. In the "Identify how you would like your breaks to be displayed" select Default break Formating.
    e.g. http://apex.oracle.com/pls/otn/f?p=50942:22
    Thats all, you should be all set.
    Thanks,
    Manish

  • How to export more than 64000 record from SqlDeveloper to Excell

    Hi ,
    my query retrive about 90,000 records and i should export those recodrs to Excell file , but when export finish i just found about 65,000 recodrs in Excell file , is there any way to export more than 65K to Excell file , or split the query result to two files ,
    by the way i'm using Oracle 10G and SqlDeveloper Version 3.0.04 .
    please help me ,

    To handle the xls limit, SQLDeveloper will create one or more new sheets within the file for the additional rows. When you open your worksheet, you should see a tab at the bottom for each sheet created.
    Joyce Scapicchio
    SQLDeveloper Team

  • Project Type Update more than 1 project at a time

    Hi All,
     Is there a possibility to change project type of more than 1 or should I say in bulk update project types for existing Projects in Project Center??
    Regards, Syed Faizan ur Rehman, CBPM®,PRINCE2®, MCTS

    Hi Syed,
    Yes it is. Go to the server settings, then change or restart workflow. From this page, you will be able to choose a source EPT and projects then a destination EPT. Note that you can use this feature evenif you don't use workflows.
    http://technet.microsoft.com/en-us/library/gg188108(v=office.14).aspx
    Hope this helps,
    Guillaume Rouyre, MBA, MCP, MCTS |

  • How to update more than 5 million records without error message ORA-00257:

    Hi ,
    I need to update some columns in my table which is contains about 5 million records
    I 've already tried this
    Update AAA_CDR
    Set RoamFload = Null ;
    but the problem is I've got the error message ("ORA-00257: archiver error. Connect internal only,until freed.) and the update consuming about 6 hours with no results ,
    then I do the commands ( Alter system set db_recovery_file_dest_size=50G) and the problem solved .
    but I need to update about 15 columns of this table to be null ,what I should do to overcome this message and update the table in reasonable time
    Please Help Me ,

    The best way would be to allocate sufficient disk space for your archive log destination. Your database is not sized properly. NOLOGGING option will not do much for you because it' only applies to direct load operations when the data inserted into nologging table is selected from another table. UPDATE will be be logged, regardless of the NOLOGGING status. Here is the quote from the manual:
    <quote>
    LOGGING|NOLOGGING
    LOGGING|NOLOGGING specifies that subsequent Direct Loader (SQL*Loader) and direct-load
    INSERT operations against a nonpartitioned index, a range or hash index partition, or
    all partitions or subpartitions of a composite-partitioned index will be logged (LOGGING)
    or not logged (NOLOGGING) in the redo log file.
    In NOLOGGING mode, data is modified with minimal logging (to mark new extents invalid
    and to record dictionary changes). When applied during media recovery, the extent
    invalidation records mark a range of blocks as logically corrupt, because the redo data
    is not logged. Therefore, if you cannot afford to lose this index, you must take a backup
    after the operation in NOLOGGING mode.
    If the database is run in ARCHIVELOG mode, media recovery from a backup taken before an
    operation in LOGGING mode will re-create the index. However, media recovery from a backup
    taken before an operation in NOLOGGING mode will not re-create the index.
    An index segment can have logging attributes different from those of the base table and
    different from those of other index segments for the same base table.
    </quote>
    If you are really desperate, you can try the following undocumented/unsupported command:
    ALTER DATABASE ARCHIVELOG COMPRESS ENABLE;
    That will cause database to compress your archive logs and consume less space. This command is not documented or supported, not even in the version 11.2.0.3 and causes the database to start spewing ORA-0600 in version 10G. DO NOT USE IN A PRODUCTION ENVIRONMENT!!!!

  • How to display more than 30 columns in one line?

    Hi,
    I want to display some 30 columns in the report.
    I dont want to split it into sub reports.
    How can i do.
    In that i have 3 groups.
    For each group i need one total.
    For example.
    after group 3 i need sub-total
    after group 2 i need total
    after group 1 i need Grand-total.
    Please help me to solve this issue.
    Thanks in advance,
    Saravanakumar.

    Sorry about that,
    Ill tell you clearly.
    Actualy I am having 12 columns, under each column, i have 5 sub-columns.
    I couldn't accomodate all the columns in a single horizontal line(I tried in A2 paper size).
    So i decided to have cross tab. Because top 5 columns can be dinamic.
    How can have subtotals inside cross tab after each group.
    Thanks ,
    Saravanakumar

  • How to display more than 12 numbers in one single  column  of excel

    hi,
    i lokesh, i am using gui_download for downloading excel sheet. actually during download one of my field contains 18 numbers, so in excel, in that particular column it shows as a 3.0000E18 and also for example: actually property number is 100000000000005263, it shows as a 1.0000E18, if i click on the 1.0000E+18, at the top it shows as a 10000000000000005000. it does not show last 3 numbers like 263.
    what i want is during run time i want to display property number as a 100000000000005263 in one column.
    any body knows for this solution pls let me know.

    Hi,
    You're using gui_download to create a file which you then have to import into Excel?  If so, then you can format the field as 'Text' during the import process.  The default cell-category is 'General', which will treat numeric values as numbers, causing the problem you describe.
    If you do not want to give users this task, then one idea is to put some non-numeric character(s) into the cell, e.g. 'PN 100000000000005263' - where PN stands for property number.

  • Need Trigger reject when update more than 1 row

    I need make a trigger who rejects when a user intents update more than one record.
    The user only can update one row, but when update without WHERE all data was modified and cause problems.
    Thanks,
    MIGUEL ANGEL CARO
    [email protected]

    YTou can keep track of the number of updated records in a global package variable, as in the next example.
    create or replace package pkg_test as
    g_count number;
    procedure p_reset;
    procedure p_increase;
    function f_updated return number;
    end;
    create or replace package body pkg_test as
    procedure p_reset is
    begin
    g_count := 0;
    end;
    procedure p_increase is
    begin
    g_count := g_count + 1;
    end;
    function f_updated return number is
    begin
    return g_count;
    end;
    end;
    create table ttemp (t_col varchar2(10))
    create trigger bu_tmp before update on ttemp
    begin
    pkg_test.p_reset;
    end;
    create trigger au_tmp after update on ttemp for each row
    begin
    if pkg_test.f_updated > 0 then
    raise_application_error(-20000,'Trying to update more than 1 record at the same time');
    end if;
    pkg_test.p_increase;
    end;

  • How can I "Save" more than 1 page at a time?

    Firefox 4.0.1. Safari 5.0.5. iMac OS10.6.7. Just started using Firefox. Can't figure out how to Save more than 1 page at a time. Tried to save 3pp article in NY Times, several times in several ways. No deal. Went back to Safari and did it easily. Probably because that's what I'm used to. How do you do it on Firefox? This is probably a dumb question, but please be kind. Any reply appreciated. I've spent a couple of hours trying to solve this myself.

    Some menu entries in the main menu bar are hidden if you use the mouse and only appear if you use the keyboard to open the menu (Bug 626825).
    You can see the difference if you use Alt+F to open the File menu or Alt+B to open the Bookmarks menu and compare that to what you see if you use the mouse to open the menu after you have made the menu bar visible by tapping Alt or by pressing F10.
    * "Bookmark All Tabs" (Shift+Ctrl+D) no longer shows in the Bookmarks menu unless you open the Bookmarks menu via the keyboard (Alt + B).
    * "Bookmark This Page" can be accessed via the right-click context menu of that browser page.
    * "Bookmark All Tabs" can be accessed via the right-click context menu of a tab on the tab bar.
    See also:
    * [[How do I use bookmarks?]]
    * Bookmark All: https://addons.mozilla.org/firefox/addon/bookmark-all/

Maybe you are looking for