Divide a line into several lines based on the amount

Dear all,

Please provide a solution for this scenario.

The query...

Select line_id, component, sizes, quantity of sales_tab;

and the result...

LINE_IDCOMPONENTSIZESQUANTITY
8BODYSMALL214.33
4BODYMEDIUM187.89
1BODYLARGE230.87
7BODYEXTRA LARGE205.03
3BODYXX LARGE148,52
2SLEEVESMALL197.57
6SLEEVEMEDIUM176.4
5SLEEVELARGE193.8
10SLEEVEEXTRA LARGE184.87
9SLEEVEXX LARGE138.53

Business rule: for all rows where the quantity is greater than 200, generate a new identical line with quantity = quantity - 200 like - we. This is the quantity of each line must not exceed 200.

The required result is...

LINE_IDCOMPONENTSIZESQUANTITY
8BODYSMALL200
8BODYSMALL14.33
4BODYMEDIUM187.89
1BODYLARGE200
1BODYLARGE30,87
7BODYEXTRA LARGE200
7BODYEXTRA LARGE5.03
3BODYXX LARGE148,52
2SLEEVESMALL197.57
6SLEEVEMEDIUM176.4
5SLEEVELARGE193.8
10SLEEVEEXTRA LARGE184.87
9SLEEVEXX LARGE138.53

Thank you

Usman

Use:

Select line_id,

component,

sizes,

amount of column_value

of sales_tab.

table)

cast)

MultiSet)

Select less (200, - 200 quantity * (level - 1))

of the double

connect in quantity > 200 * (level - 1)

)

as sys. OdciNumberList

)

)

order of line_id,

amount desc

/

For example:

SQL > with sales_tab like)
2 Select line_id 8, component 'Body', 'SMALL' amount 214.33 of all sizes the double union
3. Select 4, 'BODY', 'WAY', 187.89 double Union all
4 Select 1, 'BODY', 'LARGE', 230.87 double Union all
5. Select 7, 'BODY', 'EXTRA LARGE', 205.03 double Union all
6 select 3, 'BODY', 'XX-LARGE', 148,52 of double union all
7. Select 2, 'CHANNEL', 'SMALL', 197.57 double Union all
8. Select 6, 'CHANNEL', 'WAY', 176.4 from dual union all
9. Select 5, 'ROUND', 'BIG', 193.8 double Union all
10. Select 10, 'ROUND', 'EXTRA LARGE', 184.87 double Union all
11. Select 9, 'ROUND', 'XX-LARGE', double 138.53
12                  )
13. Select line_id,
14 components,
15 sizes,
amount of 16 column_value
sales_tab 17,
Table 18)
19 mount)
(20) type multiset
21 select less (200, - 200 quantity * (level - 1))
22 double
23 connect quantity > 200 * (level - 1)
24                            )
25 as sys. OdciNumberList
26                    )
27              )
28 order of line_id,
29 quantity desc
30.

LINE_ID COMPON QUANTITY SIZES
---------- ------ ----------- ----------
1 BODY 200 GRAND
1 BODY GRAND 30,87
2 SLEEVES SMALL 197.57
3 BODY XX LARGE 148,52
4 WAY 187.89 BODY
5 SLEEVES 193.8 GRAND
SLEEVE 6 MEANS 176.4
7 BODY 200 EXTRA-LARGE
7 BODYWORK 5.03 EXTRA-LARGE
8 200 SMALL BODY
8 BODY SMALL 14.33

LINE_ID COMPON QUANTITY SIZES
---------- ------ ----------- ----------
CHANNEL 9 XX GRAND 138.53
10 SLEEVES EXTRA-LARGE 184.87

13 selected lines.

SQL >

SY.

Tags: Database

Similar Questions

  • Query SQL to split the lines based on the amount

    I have the data in the following format in the table.

    ORDER_ID PRODUCT_ID QUANTITY

    O1 A1   3

    I need to write the sql query to divide the data in following format:

    ORDER_ID PRODUCT_ID QUANTITY

    O1 A1   1

    O1 A1   1

    O1 A1   1

    Query must split the data based on the value in the quantity column.

    Thank you

    Developer

    Hello

    create table order_items (
      order_id varchar2(2),
      product_id varchar2(2),
      quantity number
    )
    ;
    insert into order_items values ('O1', 'A1', 3)
    ;
    -- Recursive Subquery Factoring
    with item(order_id, product_id, quantity) as (
      select
        order_id, product_id, quantity
      from order_items
      union all
      select
        order_id, product_id, quantity - 1
      from item
      where quantity > 1
    )
    select
      order_id, product_id, 1 quantity
    from item
    order by order_id
    ;
    drop table order_items purge
    ;
    
    Table ORDER_ITEMS created.
    
    1 row inserted.
    
    OR PR   QUANTITY
    -- -- ----------
    O1 A1          1
    O1 A1          1
    O1 A1          1
    
    Table ORDER_ITEMS dropped.
    
  • How to divide a line into several posts based on the period.

    Hello

    I have data from the table like this:

    Project EMP_ID Date_Assignment Date_Expiry EMP_TYP

    P001 1000 1 JUNE 2015 30 JUNE 2015 D

    P001 1001 1 JULY 2015 31 JULY 2015 D

    1002 1 AUGUST 2015 31 AUGUST P001 2015 D

    P001 2000 01 - JUN - 2015 31-DEC-9999 M

    The report of three developers to the Manager during their own lifetime. I want the corresponding duration of Manager for each of them:

    Project EMP_ID Date_Assignment Date_Expiry EMP_TYP

    P001 1000 1 JUNE 2015 30 JUNE 2015 D

    P001 1001 1 JULY 2015 31 JULY 2015 D

    1002 1 AUGUST 2015 31 AUGUST P001 2015 D

    P001 2000 1 June 2015 M June 30, 2015

    P001 2000 July 1, 2015 M July 31, 2015

    P001 2000 31 August 1, 2015-AUG - 2015 M

    P001 2000 M 01-SEP-2015 31-DEC-9999

    For the last span (01-SEPT.-15 to 31 - DEC-9999) there is no developer reporting to the Manager.

    How in Oracle 11 g?

    Post edited by: 2808486

    The date ranges developers will never overlap? If so, what would happen?

    Your desired results can be achieved like this, but I don't think it makes a lot of sense:

    SELECT emp_id, date_assignment, date_expiry, emp_typ

    WCP

    WHERE emp_typ = '

    UNION ALL

    SELECT em.emp_id, ed.date_assignment, ed.date_expiry, em.emp_typ

    Ed, em emp EMP

    WHERE ed.emp_typ = '

    AND em.emp_typ = am'

    UNION ALL

    SELECT em.emp_id, MAX (ed.date_expiry) + 1, TO_DATE (31-DEC-9999 ',' mon-dd-yyyy ""), em.emp_typ

    EMP ed, emd em

    WHERE ed.emp_typ = '

    AND em.emp_typ = am'

    GROUP BY em.emp_id

    ORDER BY 4.2

  • assign the number to a line based on the analytical condition function

    Oracle 11g Server

    ID val1 val2
    100a
    110 b
    120c
    200a
    220 b

    WITH input AS
     (SELECT 1  id
            ,0  val1
            ,'0a' val2
        FROM dual
      UNION ALL
      SELECT 1  id
            ,1  val1
            ,'0b' val2
        FROM dual
      UNION ALL
      SELECT 1  id
            ,2  val1
            ,'0c' val2
        FROM dual
      UNION ALL
      SELECT 2  id
            ,0  val1
            ,'0a' val2
        FROM dual
      UNION ALL
      SELECT 2     Id
            ,2val1
            ,'0b'    val2
        FROM dual)
    SELECT * FROM input;
    
    !-[CodeBlockEnd:ae52826b-04c5-4aa4-a6c0-1d0405656e55]-->

    Output:

    ID val1 val2 assigned_number
    100a0
    110 b0
    120c2
    200a0
    220 b1

    The dense numbering sequence must be assigned to each line based on the column id and val1.

    For an identifier given, the numbering begins only after val1 > 1 until then the assigned_number will be zero.

    WITH the entry INTO

    (SELECT 1 id)

    0 val1

    '0' has val2

    OF the double

    UNION ALL

    SELECT 1 id

    1 val1

    b '0' val2

    OF the double

    UNION ALL

    SELECT 1 id

    2 val1

    , 0'c ' val2

    OF the double

    UNION ALL

    SELECT 2 id

    0 val1

    '0' has val2

    OF the double

    UNION ALL

    SELECT the Id 2

    2val1

    b '0' val2

    THE DOUBLE)

    SELECT id, val1, val2,

    Rank() over (partition by order of case when val1 > 1 then 0 otherwise end val1) dr-1

    SINCE the entry;

    ID VAL1 IS DR

    ---------- ---------- -- ----------

    1          0 0a          0

    1          1 0b          0

    1          2 0c          2

    2          0 0a          0

    2          2 0b          1

  • Hide a line based on the State.

    Hello, I have a requirement where I have to hide a line based on the State. I am able to highlight the lines but hide the entire line does not work.

    Condition must be met on a line:

    • Thus, if a sum of EXP5_11, EXP6_11, EXP7_11 and EXP8_11 in a current group is all zeros hide this line. Please refer to the RTF-model.

    Attachments:

    • RTF-model.
    • XML file.
    • Sample output generated when the lines are highlighted the meeting status.

    Any help is much appreciated on how I can hide a line.

    EM-: [email protected]

    If please remove your IF condition and add the following code inside the foreach tag

    This works very well in my test.

  • Create lines based on the difference in date

    Hello

    I would like to create lines based on the difference between the start and end dates (per year).

    for example

    ID1  Start_time                                             End_time                                                      ID2
    07/01/2003 1, 12.00.00.000000000 2005-01-07 12.00.00.000000000 123

    07/01/1999 1, 12.00.00.000000000 07/01/2003 12.00.00.000000000 345

    I need:

    ID1  Start_time                                             End_time                                                      ID2
    07/01/2004 1, 12.00.00.000000000 2005-01-07 12.00.00.000000000 123

    07/01/2003 1 12.00.00.000000000 07/01/2004 12.00.00.000000000 123

    1 01/07/2002 12.00.00.000000000 07/01/2003 12.00.00.000000000 345

    07/01/2001 1, 12.00.00.000000000 01/07/2002 12.00.00.000000000 345

    07/01/2000 1, 12.00.00.000000000 01/07/2001 12.00.00.000000000 345

    07/01/1999 1, 12.00.00.000000000 07/01/2000 12.00.00.000000000 345

    Thank you

    Hello

    Here's one way:

    SELECT ID1

    , ADD_MONTHS (start_time, 12 * (LEVEL - 1)) AS start_time value

    , ADD_MONTHS (start_time, 12 * LEVEL) AS end_time

    id2

    FROM table_x

    CONNECT BY LEVEL<= months_between="" (end_time,="" start_time)="">

    AND PRIOR id2 = id2

    AND PRIOR SYS_GUID () IS NOT NULL

    ;

    I'm assuming that id2 is unique.

    Would what results you if end_time wasn't exactly N years after start_time?

  • 2-way and 3 corresponding path based on the amount of the claim?

    Hello

    In vanilla R12, is it possible to achieve the corresponding receipt based on the amount of the claim.

    Amount of requisitions to say so is less then $ 50, it will be 2 corresponding way.

    Otherwise, it will be 3 corresponding path.

    Kind regards

    Emma

    Emma

    It is not possible to vanilla R12, match PO option is set at the level of the organization. However, invoice match option examples at the level of the item as well. So if there are specific items which should be 2-way while at the level of the Organization, there must be 3-way matching, which can be taken in charge.

    I hope this helps.

    Thank you

    Roger

    (PS: Please tick the correct answer or useful if the answer)

  • change the color of line based on the value of column 5 Apex in the classic report

    Version of the apex 5.0.0.00.31

    Standard universal theme

    Page theme default template

    Classic report

    Foldable report template

    Hello

    I know this question has been asked several times here, but I'm working on 5 Apex and need to know the correct way to do it in this version.

    I need to change the color of the text of the entire line (no background color) based on the value in one of the columns of the classic report. I have just two conditions, if the value of column = Yes, color should be red, otherwise it must be green.

    I am new to jscript and css, so appreciate if someone can tell me the solution with steps.

    I have already checked this link that changes the value of the column, need to do something similar to the whole line.

    https://tylermuth.WordPress.com/2007/12/01/conditional-column-formatting-in-apex/

    Hi coolmaddy007-Oracle,.

    Here's an example set up on the apex.oracle.com according to the specifications you gave: https://apex.oracle.com/pls/apex/f?p=35467:1

    Version of the apex 5.0.0.00.31

    Standard universal theme

    Page theme default template

    Classic report

    Foldable report template

    Here is how it is done:

    Create a dynamic action with the following specifications:

    Name: Give the appropriate name

    Event: After refresh

    Selection type: region

    Region: select your region classic report

    Condition: No strings attached

    Action: Run the JavaScript Code

    Fire on loading the Page: Yes

    Code:

    $('td[headers="JOB"]').each(function() {
      if ( $(this).text() === 'MANAGER' ) {
        $(this).closest('tr').find('td').css({"color":"red"});
      }
      if ( $(this).text() === 'SALESMAN' ) {
        $(this).closest('tr').find('td').css({"color":"green"});
      }
      if ( $(this).text() === 'CLERK' ) {
        $(this).closest('tr').find('td').css({"color":"blue"});
      }
    });
    

    NOTE: Download the selector appropriate for your knowledge $('td[headers="JOB"]') case using firebug/browser development tools.

    Items concerned: leave blank.

    PS: Changed the example to change the color of text instead of the background color.

    I hope this helps!

    Kind regards

    Kiran

  • Generating lines based on the value of the column?

    Hi all

    I would like to know if there is a function that can help me in creating lines based on a column value and, if so, which. I'm on version 11.2.0.3.0

    for example, I have these data in the table:
    ID O A C
    1 5 3 5
    2 9 2 3

    Where ID is an identifier unique record and column C contains the number of records, I would have returned for this ID. In this example, the folder with the ID 1 would be repeated 5 times and the folder with the id 2 would be repeated 3 times. The result would look like this:

    ID O A C
    1 5 3 5
    1 5 3 5
    1 5 3 5
    1 5 3 5
    1 5 3 5
    2 9 2 3
    2 9 2 3
    2 9 2 3

    Column C contains the number of repetitions Records and is defined as a positive integer > = 1.

    Of course, in real life, the table contains (at this time) 41 M number of records and the value of C can vary between 1 and 554, hardcode on the example above values is not possible.

    Any pointers in the right direction are much appreciated.

    Kind regards
    Lennert
    SQL> ed
    Wrote file afiedt.buf
    
      1  with t as (select 1 as id, 5 as c from dual union all
      2             select 2, 3 from dual)
      3  --
      4  select id, c
      5  from   t
      6  connect by level <= c
      7          and id = prior id
      8*         and prior sys_guid() is not null
    SQL> /
    
            ID          C
    ---------- ----------
             1          5
             1          5
             1          5
             1          5
             1          5
             2          3
             2          3
             2          3
    
    8 rows selected.
    
  • Web Forms: Deleting line based on the value of a specific column

    Hello

    I have an online form in which I want to apply delete missing on the ranks, but only on the value of the first column. So, if the first column is #missing I want the deleted row, even if the columns are given in it.

    Is it possible to do this?

    I'm on ver 11.1.2.2 Hyperion Planning

    Shehzad

    Published by: shehzad k on January 24, 2013 11:51

    Unfortunately, no. There is no way to add the delete line based SOLELY on the existence of a value in the first column. It would be nice to see some of the more advanced features "conditional delete", we en flies over to the planning of the entry forms.

    You can do the "clumsy" things with data validations where you gray - out ranks in view of the existence of a value in a particular cell, however while this might SUGGEST that the user should not enter data in a particular line, it would not PREVENT to do so.

    We have seen many improvements in form lately with the introduction of data validations. I hope the momentum continues.

    -Jake

  • SQLCL - retrieves different number of lines based on the style of SQL

    SQLcl: Release 4.1.0 Release Candidate on Tue Jul 14 10:24:05 2015
    Copyright (c) 1982, 2015, Oracle.  All rights reserved.
    

    I need spool on CSV for 2 SQL statements for a thorough comparison. So, my appearance of SQL statements like this,

    set sqlformat csv
    set trimspool on
    spool file1.csv
    select blah blah blah from some_table;
    spool off
    

    Second SQL looks like this,

    set sqlformat csv
    set trimspool on
    spool file1.csv
    with s1 as (sql_statement)
    ,s2 as (sql_Statement)
    select blah blah from table join s1 ... join s2 ... ;
    spool off
    

    the two SQLs are stored in individual files, when I run the first sql, it reads 4400 + lines as expected and generates a CSV. When I run the second SQL (which uses WITH clause), it gets only 50 lines and stops.

    Ideas or reasons for this? The second SQL is also expected to extract about 4400 lines, it's the sql developer and I can export in csv, but wait sqlcl behaves well. I guess it I'm missing something here, can someone point me to the error?

    TIA

    REDA

    I think I understand the problem, it was a classic user error. Sorry everyone, I have an obscure where clause that I completely missed. Once removed, it worked flawlessly.

    REDA

  • Select lines based on the State of the same line

    Hello

    I have the following table structure and lines defind here
    http://sqlfiddle.com/#! 3f474/4/3

    I want Select if lines
    PRODUCT_NO
    is null, then I need to select rows that have the IS_PAYABLE = 'Y '. If
    PRODUCT_NO
    is not null
    then IS_PAYABLE will be ' no or IS_PAYABLE will be null.

    For example
    For PRODUCT_REG HPO_FABRIC, a
    PRODUCT_NO
    NULL if I need select this line only, not the other two rows.
    I can do
    select * from SUPPLIER_DETAILS where  IS_PAYABLE='Y'
    , but if there are many records with null or not null PRODUCT_NO

    How can I do this using sql?
    select
      PRODUCT_REG,
      PRODUCT_SUPPLIER_CODE,
      PRODUCT_NO,
      START_DATE,
      END_DATE,
      IS_PAYABLE
    from (
    select
      PRODUCT_REG,
      PRODUCT_SUPPLIER_CODE,
      PRODUCT_NO,
      START_DATE,
      END_DATE,
      IS_PAYABLE,
      row_number() over (partition by product_reg order by decode(is_payable,'Y',1,'N',2,3), product_no nulls first) rn
    from
    SUPPLIER_DETAILS
    )
    where
    rn = 1
    
    PRODUCT_REG     PRODUCT_SUPPLIER_CODE     PRODUCT_NO     START_DATE     END_DATE     IS_PAYABLE
    HPO_FABRIC     JP_008     -      08/01/2001     08/31/2001     Y
    STG_PIL     SJ_090     STG-PILLOWS     01/04/2001     01/31/2001     - 
    

    Published by: chris227 on 17.09.2012 13:30

  • SQL script to insert values into a table based on the type of user

    Hello

    I have a requirement where I need to insert (username, groupname) in a table based on the user name.

    We have two types of user accounts:

    (1) user name, which starts with "DV" example: "DVPATM."

    regular user 2) example: 'PATM '.

    If the user name begins with "DV" under instruction insert should kick in

    insert into < tablename > (username, groupname) VALUES (< username > ' < groupname1 >).

    otherwise below insert statement should kick in

    insert into < tablename > (username, groupname) VALUES (< username > ' < groupname2 >).

    I need to use SQL or stored only procedure.

    Please suggest

    Thanks in advance

    All things being constant, you could use decode/case just for groupname by examining the first character t the user name, for example

    insert into (username, groupname) VALUES (, (substr ( , 1, 2) the case when "DV" then else end));

    Fixed edit: value for OTHERS, as noted by Frank

  • Is it possible to import the same JavaScript document into several PDF documents at the same time

    I have a recurring project where I disable advance click into individual PDF by using a JavaScript document. Is it possible to import this script into several PDF files at once rather than having to manage it at the same time?

    You can create an Action that adds the script. Curiously, the Action would be a JavaScript that uses the doc.addScript () method.

  • How can I update several lines based on the comparison of the fields table 1 and 2

    I create the following SQL to test what I found a method to update the records where the fields below the game, but what ends up happening is that the update functions works the first time and then basically updates everything to null. I don't understand what I'm doing wrong. New to this.

    UPDATE SLS_HDR B
    DEFINE (B.ORD_DT, B.SHIP_ADD_CD, B.INV_ADD_CD, B.LOB, B.STATUS,
    B.ORD_TYPE, B.HDR_ROUTE, B.PRICE_LIST, B.CUST_ORDER, B.REF_A, B.REF_B,
    B.ORD_REF, B.ORD_DISC, B.SREP, B.SREP2, B.PLAN_DEL_DT, B.TXTA, B.TXTB,
    B.INV_CONTACT, B.SHIP_CONTACT, B.SOLD_CONTACT, B.PAY_CONTACT, B.ORD_AMT, B.UPDATED_DT)
    (SELECT =
    A.ORD_DT, A.SHIP_ADD_CD, A.INV_ADD_CD, A.LOB, A.STATUS,
    A.ORD_TYPE, A.HDR_ROUTE, A.PRICE_LIST, A.CUST_ORDER, A.REF_A, A.REF_B,
    A.ORD_REF, A.ORD_DISC, A.SREP, A.SREP2, A.PLAN_DEL_DT, A.TXTA, A.TXTB,
    A.INV_CONTACT, A.SHIP_CONTACT, A.SOLD_CONTACT, A.PAY_CONTACT, A.ORD_AMT, SYSDATE
    Of
    SLS_HDR_TEMP HAS
    WHERE
    A.FIN_COMP = B.FIN_COMP AND
    A.LOG_COMP = B.LOG_COMP AND
    A.ORD_NO = B.ORD_NO AND
    A.TRANS_DT = B.TRANS_DT AND
    A.BP_TYPE = B.BP_TYPE AND
    A.STATUS <>B.STATUS);

    Can someone advise?
    Thank you

    Published by: 903292 on December 19, 2011 13:15

    you don't have a where clause in your update so no-matched lines will be updated with null values

    UPDATE SLS_HDR B
    SET ( B.ORD_DT, B.SHIP_ADD_CD, B.INV_ADD_CD, B.LOB, B.STATUS,
    B.ORD_TYPE, B.HDR_ROUTE, B.PRICE_LIST, B.CUST_ORDER, B.REF_A, B.REF_B,
    B.ORD_REF, B.ORD_DISC, B.SREP, B.SREP2, B.PLAN_DEL_DT, B.TXTA, B.TXTB,
    B.INV_CONTACT, B.SHIP_CONTACT, B.SOLD_CONTACT, B.PAY_CONTACT, B.ORD_AMT,B.UPDATED_DT )
    = (
              SELECT
              A.ORD_DT, A.SHIP_ADD_CD, A.INV_ADD_CD, A.LOB, A.STATUS,
              A.ORD_TYPE, A.HDR_ROUTE, A.PRICE_LIST, A.CUST_ORDER, A.REF_A, A.REF_B,
              A.ORD_REF, A.ORD_DISC, A.SREP, A.SREP2,A.PLAN_DEL_DT, A.TXTA, A.TXTB,
              A.INV_CONTACT, A.SHIP_CONTACT, A.SOLD_CONTACT,A.PAY_CONTACT, A.ORD_AMT, SYSDATE
              FROM
              SLS_HDR_TEMP A
              WHERE
              A.FIN_COMP = B.FIN_COMP AND
              A.LOG_COMP = B.LOG_COMP AND
              A.ORD_NO = B.ORD_NO AND
              A.TRANS_DT = B.TRANS_DT AND
              A.BP_TYPE = B.BP_TYPE AND
              A.STATUS= B.STATUS
         )
    WHERE EXISTS
    (
         select null from SLS_HDR_TEMP A
         WHERE
         A.FIN_COMP = B.FIN_COMP AND
         A.LOG_COMP = B.LOG_COMP AND
         A.ORD_NO = B.ORD_NO AND
         A.TRANS_DT = B.TRANS_DT AND
         A.BP_TYPE = B.BP_TYPE AND
         A.STATUS= B.STATUS
    )
    

    OR using Merge

    Merge into SLS_HDR B
    using SLS_HDR_TEMP A
    on (A.FIN_COMP = B.FIN_COMP AND
    A.LOG_COMP = B.LOG_COMP AND
    A.ORD_NO = B.ORD_NO AND
    A.TRANS_DT = B.TRANS_DT AND
    A.BP_TYPE = B.BP_TYPE AND
    A.STATUS= B.STATUS)
    when matched then update set (B.ORD_DT, B.SHIP_ADD_CD, B.INV_ADD_CD, B.LOB, B.STATUS,
    B.ORD_TYPE, B.HDR_ROUTE, B.PRICE_LIST, B.CUST_ORDER, B.REF_A, B.REF_B,
    B.ORD_REF, B.ORD_DISC, B.SREP, B.SREP2, B.PLAN_DEL_DT, B.TXTA, B.TXTB,
    B.INV_CONTACT, B.SHIP_CONTACT, B.SOLD_CONTACT, B.PAY_CONTACT, B.ORD_AMT,B.UPDATED_DT ) = (A.ORD_DT, A.SHIP_ADD_CD, A.INV_ADD_CD, A.LOB, A.STATUS,
    A.ORD_TYPE, A.HDR_ROUTE, A.PRICE_LIST, A.CUST_ORDER, A.REF_A, A.REF_B,
    A.ORD_REF, A.ORD_DISC, A.SREP, A.SREP2,A.PLAN_DEL_DT, A.TXTA, A.TXTB,
    A.INV_CONTACT, A.SHIP_CONTACT, A.SOLD_CONTACT,A.PAY_CONTACT, A.ORD_AMT, SYSDATE)
    

    HTH...

    Thank you

Maybe you are looking for