How can we split limit row counts for DB2?

We want to mass data from DB2. but, we guess 200,000,000 count.
so we try to split by 5,000 count and almost 5 MB.
How can we use sql query for DB2? How can we make JDBC Sender?
but, We don't use update query. because Customer did not allow ours requirement.
How can we do?

Well, there are ways, how to achieve success, but in all of them must customer do some changes in their database.
a, create "interface table", run select into (load relevant data to it) and then run JDBC adapter select on this table using update statement to mark the processed lines
b, there is for sure a table, which is "main" - every record is replicated and every one is repliacted only once.. Add new column to this table and use it as a "marker" for already processed records..
...for example...
There may be of course more possibilites...
If you don't want to process all records at once, there must be some flag to distinguish already processed records from not processed ones..
Peter

Similar Messages

  • How can I get the shutter count for my Canon 7D Mark II using Windows XP?

    How can I get the shutter count for my Canon 7D Mark II using Windows XP? I've been looking lots of places and doing some file uploads, but I can't seem to find anything. I'm wary of downloading software I know nothing about. Any help is greatly appreciated.
    Solved!
    Go to Solution.

    Nevermind, just, sort of answered my own question. Doesn't work on XP, but using a Win 7 'puter I was able to use Shutter Count, which now works w/ the 7D Mark II.

  • How can I log the byte count for a network interface

    I'd like to track/log the number bytes transmitted and received on a network interface. The end result is to give daily and or monthly usage counts.
    How can I do that?

    This software might do the trick. Not too expensive and it has a free trial.
    It keeps logs of each time the program is run and you can configure it to run at system startup in the preferences window. If you go to the Tools menu and choose Traffic Log the calculator can let you specify time frames. Might be what you need!
    http://www.macupdate.com/info.php/id/6172/net-monitor
    -Pat

  • How can I get a shutter count for my EOS1Ds Mark II?

    I am trying to get a shutter count for my EOS 1Ds MarkII in order to sell it, and buy a Mark III. Any ideas out there?
    Solved!
    Go to Solution.

    Click HERE
    EOS 1Ds Mk III, EOS 1D Mk IV EF 50mm f1.2 L, EF 24-70mm f2.8 L,
    EF 70-200mm f2.8 L IS II, Sigma 120-300mm f2.8 EX APO
    Photoshop CS6, ACR 9, Lightroom 6

  • How can I split one row to multiple rows

    Table like this
    CREATE TABLE T(ID NUMBER(12),START_DATE DATE,END_DATE DATE,ORDER_ID NUMBER(12),PROD_ID NUMBER(12));
    data like this
    ID START_DATE END_DATE ORDER_ID PROD_ID
    1 2013-01-01 2013-03-31 12 123
    2 2013-04-01 2013-06-30 12 123
    3 2013-01-01 2013-05-30 12 234
    4 2013-02-01 2013-04-30 13 123
    5 2013-07-01 2013-09-30 13 345
    I want the result like this
    ID DIFF_DATE ORDER_ID PROD_ID
    1 201301 12 123
    2 201302 12 123
    3 201303 12 123
    4 201304 12 123
    5 201305 12 123
    6 201306 12 123
    7 201301 12 234
    8 201302 12 234
    9 201303 12 234
    10 201304 12 234
    11 201305 12 234
    12 201302 13 123
    13 201303 13 123
    14 201304 13 123
    15 201307 13 345
    16 201308 13 345
    17 201309 13 345
    how to write the sql ?
    Edited by: 990390 on 2013-3-31 下午11:42

    SQL> WITH t(iD ,START_DATE ,END_DATE ,ORDER_ID ,PROD_ID) AS(
      2  SELECT 1, to_date('2013-01-01','yyyy-mm-dd'), to_date('2013-03-31','yyyy-mm-dd'), 12, 123 FROM dual UNION ALL
      3  SELECT 2, to_date('2013-04-01','yyyy-mm-dd'), to_date('2013-06-30','yyyy-mm-dd'), 12, 123 FROM dual UNION ALL
      4  SELECT 3, to_date('2013-01-01','yyyy-mm-dd'), to_date('2013-05-30','yyyy-mm-dd'), 12, 234 FROM dual UNION ALL
      5  SELECT 4, to_date('2013-02-01','yyyy-mm-dd'), to_date('2013-04-30','yyyy-mm-dd'), 13, 123 FROM dual UNION ALL
      6  SELECT 5, to_date('2013-07-01','yyyy-mm-dd'), to_date('2013-09-30','yyyy-mm-dd'), 13, 345 FROM dual
      7  )
      8  SELECT add_months(MY_DATE , ROW_NUMBER() OVER(PARTITION BY Q.ORDER_ID, Q.PROD_ID ORDER BY ROWNUM)-1) ddate,
      9         Q.ORDER_ID,
    10         Q.PROD_ID
    11    FROM (SELECT MIN(T.START_DATE) MY_DATE,
    12                 MAX(T.END_DATE),
    13                 MONTHS_BETWEEN(MAX(T.END_DATE),MIN(T.START_DATE))+1 CNT,
    14                 T.ORDER_ID,
    15                 T.PROD_ID
    16            FROM t
    17           GROUP BY T.ORDER_ID, T.PROD_ID) Q,
    18         TABLE (SELECT COLLECT(ROWNUM) FROM DUAL CONNECT BY LEVEL <= Q.CNT)
    19   ORDER BY Q.ORDER_ID, Q.PROD_ID
    SQL> /
    DDATE         ORDER_ID    PROD_ID
    01.01.2013          12        123
    01.02.2013          12        123
    01.03.2013          12        123
    01.04.2013          12        123
    01.05.2013          12        123
    01.06.2013          12        123
    01.01.2013          12        234
    01.02.2013          12        234
    01.03.2013          12        234
    01.04.2013          12        234
    01.05.2013          12        234
    01.02.2013          13        123
    01.03.2013          13        123
    01.04.2013          13        123
    01.07.2013          13        345
    01.08.2013          13        345
    01.09.2013          13        345
    17 rows selected
    SQL> ----
    Ramin Hashimzadeh
    Edited by: Ramin Hashimzadeh on Apr 1, 2013 12:15 PM

  • Get row count for different tables to the same line

    How can I get the row count for different tables in one line:
    SELECT count(A), count(B), count(C) from table tb_a A , tb_b B, tb_c C;
    Thanks!

    >
    Hi,
    How can I get the row count for different tables in one line:
    SELECT count(A), count(B), count(C) from table tb_a A , tb_b B, tb_c C;Something like this? One of the many uses for CTE's - Common Table Expressions - AKA
    subquery refactoring. Worth getting to know - very handy!
    with acount as
      select count(*) as counta from dual  -- put your table name here
    bcount as
      select count(*) as countb from dual  -- put your table name here
    ccount as
      select count(*) as countc from dual  -- put your table name here
    select a.counta, b.countb, c.countc from acount a, bcount b, ccount c;HTH,
    Paul...
    Edited by: Paulie on 25-Jul-2012 17:44

  • How can i set the alternating colors for a table rows

    Dear All,
    Please any one help me how can i set the Alternating colors for Table Rows.
    i created a theam there i set the background alternating color to brown and i set the table design properity to alternating. but it is not reflecting.

    Hi,
    The design property in Table properties should work for your requirement. Select "alternating" value for design.
    Please see the API below:
    design
    Determines the appearance of the table. The property design can take the following values and is represented by enumeration type WDTableDesign.
    alternating - The table rows are displayed alternately in a different color.
    standard - The table background has one color. The individual table rows are displayed with grid net lines.
    transparent - The table background is transparent. The individual table rows are displayed without grid net lines.
    Check whether you have changed the right property or not? Also table should contain more than one rows to test this scenario.
    Regards,
    Jaya.
    Edited by: VJR on Jun 17, 2009 6:43 PM

  • How can I label my rows on numbers so I can keep a running count? Dave

    How can I label my rows on numbers so I can keep a running count?
    i would like to number from 1 to 150  by highlighting and use a function command
    Dave
                   Name               Address          Email
    Ex      1
              2
              3
              4
              150

    Add a column to the left of column A (it will become column A).
    Assuming you want to start with the first "name" in Row 2 (and NOT number the header row):
    Two methods:
    1.
    In cell A2, enter =ROW()-1
    Grab the Fill Handle (small circle, bottom right of the selected cell) and drag down to fil the formula into the rest of the cells in the column.
    If the formula is placed in ALL non-header row cells in the column, it will automatically fill into any rows added to the table.
    If rows are inserted or removed, numbers below the inserted/removed row will be automatically adjusted.
    2.
    In cell A2, enter a 1
    In cell A3, enter a 2
    Select both cells.
    Grab the Fill Handle and drag down to the rest of the cells in the column.
    These are fixed numbers. They will not be automatically filled into new rows added to the table, nor will they automatically update when rows are inserted into the table or removed from the table.
    To add more numbers, select the last two cells currently containing numbers, drag the Fill Handle down.
    Regards,
    Barry

  • Since updating my iPhone 4 to iOS5, my music stats (play count, last played, etc.) no long sync to iTunes. How can I fix this? Thanks for the help.

    Since updating my iPhone 4 to iOS5, my music stats (play count, last played, etc.) no long sync to iTunes. How can I fix this? Thanks for the help.

    If you have any podcasts in your iTunes library you should see a Podcasts sync setting tab to the right when you connect your phone and click on its name on the left sidebar (see image below).  On this tab check to sync podcasts and sync your phone.

  • How to get row count(*) for each table that matches a pattern

    I have the following query that returns all tables that match a pattern (tablename_ and then 4 digits). I also want to return the row counts for these tables.
    Currently a single column is returned: tablename. I want to add the column RowCount.
    DECLARE @SQLCommand nvarchar(4000)
    DECLARE @TableName varchar(128)
    SET @TableName = 'ods_TTstat_master' --<<<<<< change this to a table name
    SET @SQLCommand = 'SELECT [name] as zhistTables FROM dbo.sysobjects WHERE name like ''%' + @TableName + '%'' and objectproperty(id,N''IsUserTable'')=1 ORDER BY name DESC'
    EXEC sp_executesql @SQLCommand

    The like operator requires a string operand.
    http://msdn.microsoft.com/en-us/library/ms179859.aspx
    Example:
    DECLARE @Like varchar(50) = '%frame%';
    SELECT * FROM Production.Product WHERE Name like @Like;
    -- (79 row(s) affected)
    For variable use, apply dynamic SQL:
    http://www.sqlusa.com/bestpractices/datetimeconversion/
    Rows count all tables:
    http://www.sqlusa.com/bestpractices2005/alltablesrowcount/
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Webform HFM : How can I split a customheader in col  in 2 lines ?

    Dear All,
    How can I split a customheader in column in 2 lines ?
    For row , we can use ";" for return next line. But in column It'sn't work.
    Thanks for your help
    Jean Daniel

    Dear 634 Dp,
    I try it but I have the same result.
    Could you send me a example of script ?
    I have typing that : C4=C1#P020,CustomHeader:Test L1; Test L2
    C4=C1#P020,CustomHeader:Test L1; Test L2
    Thanks a lot for your help
    Jean

  • How can I display the rows into columns.

    How can I display the rows into columns. I mean
    Create table STYLE_M
    (Master varchar2(10), child varchar2(10));
    Insert itno style_m
    ('MASTER1','CHILD1');
    Insert itno style_m
    ('MASTER2','CHILD1');
    Insert itno style_m
    ('MASTER2','CHILD2');
    Insert itno style_m
    ('MASTER3','CHILD1');
    Insert itno style_m
    ('MASTER3','CHILD2');
    Insert itno style_m
    ('MASTER3','CHILD3');
    Note : The Master may have any number of childs.
    I want to display like this..
    Master child1, child2, child3, .......(dynamic)
    MASTER1 CHILD1
    MASTER2 CHILD1 CHILD2
    MASTER3 CHILD1 CHILD2 CHILD3
    Sorry for disturbing you. Please hlp me out if you have any slution.
    Thanks alot.
    Ram Dontineni

    Here's a straight SQL "non-dynamic" approach.
    This would be used if you knew the amount of children.
    SELECT
         master,
         MAX(DECODE(r, 1, child, NULL)) || ' ' || MAX(DECODE(r, 2, child, NULL)) || ' ' || MAX(DECODE(r, 3, child, NULL)) children
    FROM
         SELECT
              master,
              child,
              ROW_NUMBER() OVER(PARTITION BY master ORDER BY child) r
         FROM
              style_m
    GROUP BY
         master
    MASTER     CHILDREN                        
    MASTER1    CHILD1                          
    MASTER2    CHILD1 CHILD2                   
    MASTER3    CHILD1 CHILD2 CHILD3             Since you said that the number of children can vary, I incorporated the same logic into a dynamic query.
    SET AUTOPRINT ON
    VAR x REFCURSOR
    DECLARE
            v_sql           VARCHAR2(1000) := 'SELECT master, ';
            v_group_by      VARCHAR2(200)  := 'FROM (SELECT master, child,  ROW_NUMBER() OVER(PARTITION BY master ORDER BY child) r FROM style_m) GROUP BY master';
            v_count         PLS_INTEGER;
    BEGIN
            SELECT
                    MAX(COUNT(*))
            INTO    v_count
            FROM
                    style_m
            GROUP BY
                    master;
            FOR i IN 1..v_count
            LOOP
                    v_sql := v_sql || 'MAX(DECODE(r, ' || i || ', child, NULL))' || ' || '' '' || ';
            END LOOP;
                    v_sql := RTRIM(v_sql, ' || '' '' ||') ||' children ' || v_group_by;
                    OPEN :x FOR v_sql;
    END;
    PL/SQL procedure successfully completed.
    MASTER     CHILDREN
    MASTER1    CHILD1
    MASTER2    CHILD1 CHILD2
    MASTER3    CHILD1 CHILD2 CHILD3I'll point your other thread to this one.

  • How can I get the elapse time for execution of a Query for a session

    Hi ,
    How can I get the elapse time for execution of a Query for a session?
    Example - I have a report based on the procedure ,when the user execute that it takes say 3 min. to return rows.
    Is there any possible way to capture this session info. for this particular execution of query along with it's execution elapse time?
    Thanks in advance.

    Hi
    You can use the dbms_utility.get_time tool (gives binary_integer type value).
    1/ Initialize you time and date of beginning :
    v_beginTime := dbms_utility.get_time ;
    2/ Run you procedure...
    3/ Get end-time with :
    v_endTime := dbms_utility.get_time ;
    4/ Thus, calculate elapsed time by difference :
    v_elapsTime := v_endTime - v_beginTime ;
    This will give you time elapsed in of 100th of seconds...
    Then you can format you result to give correct print time.
    Hope it will help you.
    AL

  • How can I use multiple row insert or update into DB in JSP?

    Hi all,
    pls help for my question.
    "How can I use multiple rows insert or update into DB in JSP?"
    I mean I will insert or update the multiple records like grid component. All the data I enter will go into the DB.
    With thanks,

    That isn't true. Different SQL databases have
    different capabilities and use different syntax, That's true - every database has its own quirks and extensions. No disagreement there. But they all follow ANSI SQL for CRUD operations. Since the OP said they wanted to do INSERTs and UPDATEs in batches, I assumed that ANSI SQL was sufficient.
    I'd argue that it's best to use ANSI SQL as much as possible, especially if you want your JDBC code to be portable between databases.
    and there are also a lot of different ways of talking to
    SQL databases that are possible in JSP, from using
    plain old java.sql.* in scriptlets to using the
    jstlsql taglib. I've done maintenance on both, and
    they are as different as night and day.Right, because you don't maintain JSP and Java classes the same way. No news there. Both java.sql and JSTL sql taglib are both based on SQL and JDBC. Same difference, except that one uses tags and the other doesn't. Both are Java JDBC code in the end.
    Well, sure. As long as you only want to update rows
    with the same value in column 2. I had the impression
    he wanted to update a whole table. If he only meant
    update all rows with the same value in a given column
    with the same value, that's trivial. All updates do
    that. But as far as I know there's know way to update
    more than one row where the values are different.I used this as an example to demonstrate that it's possible to UPDATE more than one row at a time. If I have 1,000 rows, and each one is a separate UPDATE statement that's unique from all the others, I guess I'd have to write 1,000 UPDATE statements. It's possible to have them all either succeed or fail as a single unit of work. I'm pointing out transaction, because they weren't coming up in the discussion.
    Unless you're using MySQL, for instance. I only have
    experience with MySQL and M$ SQL Server, so I don't
    know what PostgreSQL, Oracle, Sybase, DB2 and all the
    rest are capable of, but I know for sure that MySQL
    can insert multiple rows while SQL Server can't (or at
    least I've never seen the syntax for doing it if it
    does).Right, but this syntax seems to be specific to MySQL The moment you use it, you're locked into MySQL. There are other ways to accomplish the same thing with ANSI SQL.
    Don't assume that all SQL databases are the same.
    They're not, and it can really screw you up badly if
    you assume you can deploy a project you've developed
    with one database in an environment where you have to
    use a different one. Even different versions of the
    same database can have huge differences. I recommend
    you get a copy of the O'Reilly book, SQL in a
    Nutshell. It covers the most common DBMSes and does a
    good job of pointing out the differences.Yes, I understand that.
    It's funny that you're telling me not to assume that all SQL databases are the same. You're the one who's proposing that the OP use a MySQL-specific extension.
    I haven't looked at the MySQL docs to find out how the syntax you're suggesting works. What if one value set INSERT succeeds and the next one fails? Does MySQL roll back the successful INSERT? Is the unit of work under the JDBC driver's control with autoCommit?
    The OP is free to follow your suggestion. I'm pointing out that there are transactions for units of work and ANSI SQL ways to accomplish the same thing.

  • Apple ID for my 9 year old - How can I set up an ID for my 9 years old. We have bought him an ITouch for his birthday, he also has a $30 iTunes card. To load up the iTunes card he needs an ID. When I try to set him up it says he is below the min age.

    How can I set up anApple ID for my 9 years old. Every time I try it tells me he is bolew the min age. If this is the case how can he download free games and how can he redeem his birthday $30 iTunes card? I dont want him to use my ID as it has my credit card details.
    I'm very fustrated with this as it seems the Apple kit is for 13 years and older only.
    Cheers
    Brad

    That's great your 9-yr-old is responsible enough to handle an iTouch!
    There's no way around the age limit. I suggest a family account that you, an adult, control.

Maybe you are looking for

  • Can I have some open and honest feedback on this site?

    Hello everyone, I am posting to get some open / honest feedback on my site.  Please feel free to comment, you will not hurt my feelings.  I would rather here it from you guys, the pros and enthusiasts who do this for a living (or hobby) and who know

  • Video input what format to set.

    Hi We have a system with HDSI video sources. by using HDSI 2 HDMI > HDMI video Grabber card or  HDSI 2 HDMI > HDMI 2 s-vide > S-Video video Grabber card or S > USB video Grabber unit. Se: http://wbsp.arb.ltu.se/connect/hardware/Converters-and-video-g

  • QM Usage Decision Query

    Dear All, I have activated QM for procurement & a inspection lot got generated at the time of GR. I have given a sample size of 5 for the fixed sampling procedure which I have assigned in the inspection plan. As per the settings I can see the sample

  • Cannot get SWF with imported video to play on server

    I have had this issue for quite some time, but I never got around to looking into it until now. I am having an issue trying to get an SWF that features an imported video to play on our web server from its URL. About six months ago, I didn't have this

  • Automatically creating data filename out of date and time information

    I read somewhere (in a book, here ?) about a programmer who never keyed in a data filename to save his data file. He just used the system date and time to create his filename. For example: now would be 20028141032.dat (2002, August 14, 10:32 am) I am