Update of custom table and column based on the number of lines inserted in it.

Hello

I have a XX_TDP_DT custom table that has a column ID_processus.
User will be be download data in the XX_TDP_DT table, but they insert any value into ID_processus.
Say if the entered data are 1000 lines.
I need to process these 1000 rows in batches, so I want to have 1 for 1 to 200 rownum = ID_processus, ID_processus = 2 for rownum 201 to 400 and so on.
How can I achieve this, any suggestions?

Database: 10g

Thank you.

You can also use NTILE to do this, see:
Re: Divide also extracted almost lines and assign a group
http://asktom.Oracle.com/pls/Apex/f?p=100:11:0:P11_QUESTION_ID:47910227585839

Tags: Database

Similar Questions

  • divide the table based on the number of lines

    Hello

    I am trying to split a table based on the number of lines and then treat.
    Say I have a TEST_XXX table that contains 50 lines, what I would do is.
    to access multiple lines of 10. How can we achieve this?

    What I thought is, once the table is created and the line are filled.
    Add a new column to the table and perform a procedure that inserts of 1 to 10 first lines
    and 2 to 10 lines and 3 to 10 next ranks... etc. Based on this, that we can treat
    the first set of lines then play next or etc...

    is there a better way to do it?

    Code to create the table:
    CREATE TABLE TEST_XXX
    (
      A_ID   VARCHAR2(10),
      B_ID   NUMBER,
      c_ID   VARCHAR2(10),
      D_ID   NUMBER
    )
    Code to add lines:

    DECLARE
    BEGIN
      FOR I IN 1..50
      LOOP
          INSERT INTO TEST_XXX VALUES('ABCDE',123,'ZYXWV',321);
      END LOOP;
      COMMIT;
    END;
    The original problem is, I have a huge table, and I write a sql query to process,
    When I treat him by selecting all the values in the table, it is very slow.
    But when I have treat small Coulon (say 100 rows), it works very well.
    That's how I got the approach described above in mind.

    You can use NTILE.

    See:
    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14200/functions101.htm#SQLRF00680
    http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:47910227585839

  • Move and organize files based on the number of lines

    Hello

    I have a directory containing files nearly 1,500, some of which are composed of 12 lines, some of which are composed of 4 lines, which are all .phy (PHYLIP) files, which can be viewed in Notepad/wordpad as text files.

    I need to execute a script which will determine the number of lines in each file and move them to the corresponding folder. The file size will not work for sorting, I've tried.

    that is, all files with 4 lines in one folder, all the files with 12 lines in another folder, any files left (so I can be sure that everything has been inspected) in the main directory.

    Can anyone help?

    Thank you

    This issue is beyond the scope of this site and must be placed on Technet or MSDN

    http://social.technet.Microsoft.com/forums/en-us/home

    http://social.msdn.Microsoft.com/forums/en-us/home

  • Basic conditional script based on the number of lines in a text layer?

    Just received help here to write a conditional script by using the font size of a text layer. Thank you all for this.

    The next hurdle is a conditional script using the number of lines in a text layer in the differential. Far as I can tell it not the layer details which specify the number of lines. Just '\r' for a return in the idTxt descriptor. Nothing seems to stand for a soft return as far as I can tell. I'll probably have to be able to count the lines with soft and hard returns.

    Any thoughts?

    I was playing around with this a bit and here is a small script to determine the number of rows. This is based on the self in the head, that I calculated to environ.108 times the size of the font.

    #target photoshop
    app.preferences.rulerUnits = Units.POINTS;
    var doc = activeDocument
    var tL = doc.activeLayer
    var h = tL.bounds[3]-tL.bounds[1]
    var per = ((h/5)-(tL.textItem.size))/tL.textItem.size
    var num = h/(tL.textItem.size *1.108)
    
    alert(Math.round( num))
    
  • How to check the number of lines inserted since the week last in the table

    Hello

    Oracle version: 11g

    OS: Linux

    We need to know the number of rows inserted for a table of 7 days, please can anyone suggest is all views to find that answer

    BR

    PMP

    The function dbms_stats.diff_table_stats_in_history should give you what you need, assuming you analyze the table regularly.

  • Select the name of the table and some data in the same sql

    If anyone can help with this?

    I need the name of the selection table that have columns called col1 (which could be done with the help of dba_tab_columns) and col1 data itself.

    Here is my desired outcome:

    table_name col1

    alex tab1
    tab2 bob
    .... ....
    Tabn sue

    TIA.

    You can use a cross join, like this...

    SELECT ut.table_name
    x.column_name
    OF some_table_name x
    ut user_tables
    WHERE ut.table_name = upper ('some_table_name');

    or...

    SELECT ut.table_name
    x.column_name
    OF some_table_name x CROSS JOIN user_tables ut
    WHERE ut.table_name = upper ('some_table_name');

    This will work if you have one or more column value returns. Basically, a table name is multiplied by the number of lines found in the table. I hope this helps.

  • Compare multiple columns and update a column based on the comparison

    Hi all

    I have to update the column STATUS of the slot structure of the table.

    Status should be 'P' if all the columns count are equal on the other should be "F".

    The value of the column can be "NA'. If the value is NA, then avoid this comparison column; compare only other 3 columns.

    My output should look like below.

    State of cnt1, cnt2 cnt3 ID cnt4

    1   4       4       4     4       P

    2   4       5       4     4       F

    3 4 4 NA 4 P

    NA 4 4 3 4

    I tried with the statemnt with BOX WHEN conditions and DECODE UPDATE, but could not succeed, can someone please help

    To do this, if you use my statement in response #11 box (Re: Re: comparison of multi-column and update a column based on the comparison of)

  • In the form of table-update a column based on the other

    Greetings,

    I want to update a column based on the value of another column in a tabular presentation. What should I use? Calculation or validation process?

    -Vatsa

    Yes, get rid of the update of "pims_component" - this is the cause of the error table mutation - and simply set

    : new.state_ind: = Ls_state;

    CITY

  • Alias table and column aliases

    I'm new to the discoverer. I have some confusion.


    1. If it is possible use different aliases for the same table during the creation of spreadsheet?

    Need to produce different joins.

    for example:

    SELECT C1. Name, C2. Remarks

    CLIENTS C1,.

    C2 customers,

    Ticket T,

    Sale S

    WHERE C1. Client_Id = T.Client_Id AND C2. Client_Id = S.Client_Id

    2. How can I use the Alias column to show as a custom in the worksheet column heading?

    for example:

    SELECT Client_Default_Name AS name OF customers


    Thanks in advance.

    Hello

    first question:

    the sql worksheet is always structured according to the EUL (the end user layer). If you have used two customer tables and created a join of tables then the sql is generated according to your requirement. There is no way we can have discoverer create a sql like this. If you are interested with the sql. You can create a custom in the business district folder and paste the sql code and create a report on the top of the custom folder.

    second question:

    You can always change the topic in the discoverer more filing cabinets according to your requriement

    hope this helps

    -N.S.

  • Comment of tables and columns are included in the Data Modeler

    Hi all
    I used Oracle SQL Developer Data Modeler (Version 3.0.0.665) and created a data model for my project. I sent an email a PDF version of the data model to our systems analyst. She asked if I could re - create the data model and include table and column comments. Is this possible and if so how this work is it?

    Thank you for your comments,

    Seyed

    Seyed salvation,

    I used the Data Modeler and create a report. The report included 36 .csv files

    What is the purpose of this 'report' task, because 36 files csv does not sound like report to me. Watch "files > reports" feature - you can generate reports for your model. -for any model, single table or tables belonging to specific subview. The report of the complete table contains additional details, so if you need these comments, then only you can create a template and select column comments appear only. So some general information table will be also included.

    Philippe

  • I'm looking for Custom table and index

    Hi Hussein;
    I want to find tables and indexes in the APPS schema. All custom tables and index begins with ZZ...

    I try to type this query, but its bring many record a lot, where I am not mistaken. And can not find the query for custom index.

    Select a.table_name, a.owner, d.CREATED
    from all_tables an inner join dba_objects d on
    a.OWNER = d.OWNER
    where table_name like '% ZZ' and 'a.OWNER =' APPS

    Thanks for the tips

    Hello

    You do not have to join, ask just DBA_OBJECTS (where type_objet = 'TABLE' and object_name like '% ZZ') or (where object_type = 'TABLE' and OWNER = "CUSTOM SCHEMA"). If you follow the standards of customization, custom tables/index should exist under the custom schema (and not under APPS schema).

    Kind regards
    Hussein

  • Find the key referenced foreign Table and column

    Can someone please refresh my memory?

    How can I determine which table and column refers to a foreign key?

    For example, with select * from ALL_constraints WHERE TABLE_NAME = 'my_table '; I can see forced CONSTRAINTA_FK and CONSTRAINTB_FK I guess reference another table and column because CONSTRAINT_TYPE = "R", but it isn't that I get. "

    I would get all the way to the referenced table and the column I just don't remember how.

    Thank you

    Lou

    Hello

    Example:

    Connected to Oracle Database 10g Express Edition Release 10.2.0.1.0
    Connected as hr
    
    SQL>
    SQL> SELECT UC.TABLE_NAME,
      2         UC.R_CONSTRAINT_NAME,
      3         UCC.TABLE_NAME,
      4         UCC.COLUMN_NAME
      5    FROM USER_CONSTRAINTS  UC,
      6         USER_CONS_COLUMNS UCC
      7   WHERE UC.R_CONSTRAINT_NAME = UCC.CONSTRAINT_NAME
      8     AND uc.constraint_type = 'R'
      9   ORDER BY UC.TABLE_NAME,
     10            UC.R_CONSTRAINT_NAME,
     11            UCC.TABLE_NAME,
     12            UCC.COLUMN_NAME;
    
    TABLE_NAME                     R_CONSTRAINT_NAME              TABLE_NAME                     COLUMN_NAME
    ------------------------------ ------------------------------ ------------------------------ --------------------------------------------------------------------------------
    COUNTRIES                      REG_ID_PK                      REGIONS                        REGION_ID
    DEPARTMENTS                    EMP_EMP_ID_PK                  EMPLOYEES                      EMPLOYEE_ID
    DEPARTMENTS                    LOC_ID_PK                      LOCATIONS                      LOCATION_ID
    EMPLOYEES                      DEPT_ID_PK                     DEPARTMENTS                    DEPARTMENT_ID
    EMPLOYEES                      EMP_EMP_ID_PK                  EMPLOYEES                      EMPLOYEE_ID
    EMPLOYEES                      JOB_ID_PK                      JOBS                           JOB_ID
    JOB_HISTORY                    DEPT_ID_PK                     DEPARTMENTS                    DEPARTMENT_ID
    JOB_HISTORY                    EMP_EMP_ID_PK                  EMPLOYEES                      EMPLOYEE_ID
    JOB_HISTORY                    JOB_ID_PK                      JOBS                           JOB_ID
    LOCATIONS                      COUNTRY_C_ID_PK                COUNTRIES                      COUNTRY_ID
    TEMP_LEAVE                     PK_CLIENT                      CLIENT                         CLIEND_ID
    VISITORS                       SYS_C004169                    GROUPS                         GROUPID
    VLANGS                         SYS_C004170                    VISITORS                       VISITORID
    
    13 rows selected
    
    SQL> 
    

    In the output:

    TABLE_NAME                     R_CONSTRAINT_NAME              TABLE_NAME                     COLUMN_NAME
    ------------------------------ ------------------------------ ------------------------------ --------------------------------------------------------------------------------
    COUNTRIES                      REG_ID_PK                      REGIONS                        REGION_ID
    

    means that a COUNTRY table has a foreing key called REG_ID_PK that points to an array of AREAS. REGION_ID
    Kind regards

    Published by: Walter Fernández on March 4, 2009 23:26 - adding explanation...

  • I just started using my new iMac 27 "and in Mail, I can't find the setting to display a column that shows the number of emails in each folder.  Mavericks, I had this column.  I have checked all the menus and preferences and search online.

    I just started using my new iMac 27 "and in Mail, I can't find the setting to display a column that shows the number of emails in each folder.  Mavericks, I had this column.  I have checked all the menus and preferences and search online.

    Click the triangle next to the Inbox to view the Inbox for each account. Then select the desired mailbox and the information will be displayed in the upper part.

    You are entitled to 90 days telephone support from Apple. Try to contact them.

    Apple Support contact

    Apple Support by email or chat

    Contact Apple Support - phone

  • NVIDIA GeForce 6600GT driver has stopped working since installing Windows 7 updates. Why? And how to remedy the situation. Tried uninstallingc download update drivers, etc. Still no luck.

    NVIDIA GeForce 6600GT driver has stopped working since installing Windows 7 updates. Why? And how to remedy the situation. Tried uninstallingc download update drivers, etc. Still no luck.

    Message that appears is: -.

    Windows has stopped this device because it has reported problems. (Code 43)

    BB

    Install the latest driver from nVIDIA:

    http://www.nvidia.com/object/Win7-WinVista-32bit-260.99-WHQL-driver.html

    http://www.nvidia.com/object/Win7-WinVista-64bit-260.99-WHQL-driver.html

    "A programmer is just a tool that converts the caffeine in code" Deputy CLIP - http://www.winvistaside.de/

  • I have a few updates that will fail and she keeps offers the update of these points - I noticed that he often has to do with something related 64-bit.

    I updated my newly installed Windows 7 Pro (64) and many update took place, BUT...

    I have a few updates that will fail and she keeps offers the update of these points - I noticed that he often has to do with something related 64-bit.

    How document and fix this?

    Welcome!

    See if using the auditor system in Windows files can repair the files of Windows updates:

    https://support.Microsoft.com/en-us/KB/929833

    Similarly, you can reset Windows updates by following this here:

    https://support.Microsoft.com/en-us/KB/971058

Maybe you are looking for