One single insert for multiple inserts if the tables in from are same

Hi all,
Can I have a single insert for below 3 insert stm.
declare
v_z number;
begin
v_z :=0.0;
INSERT INTO rd_carry_new1
SELECT  s.ssm_id,
     s.ssm_id as adjusted_cusip,
     v_z as rolldown, --= @zero,                     
     v_z as oas, --=@zero,                     
     nvl(srm.carry_rate, 0.0) as carry,
     v_z as finance_rate, --= @zero,                           
     v_z as price_drop, --= @zero,
     sw.heldby_pco_sw,
     v_z as carry_bk1, --= @zero,        -- place holders for interim results
     v_z as carry_bk2, --= @zero,
     'Y              ' AS r_srm_flag,     --r_srm_flag     = "Y              ", /*-- Indicates value from SRM, stale these should not be updated at any point*/
     'Y              ' AS o_srm_flag,     --o_srm_flag     = "Y              ",
     'Y              ' AS c_srm_flag,     --c_srm_flag     = "Y              ",
     'Y              ' AS f_srm_flag,     --f_srm_flag     = "Y              "
     'SRM' AS oas_method                         --,          oas_method='SRM'
FROM  sec_tab_sdb s,
  sr_measures srm,
  sec_sw sw
WHERE s.ssm_id = srm.ssm_id
AND   s.ssm_id = sw.ssm_id;
insert into rd_finance_new1
select  s.ssm_id,
     v_z as rolldown,                     
     v_z as oas,                     
     v_z as carry,                        
     nvl(srm.financing_rate,0) as finance_rate,    
     v_z as price_drop,
     sw.heldby_pco_sw,
     v_z as rolldown_bk1,        -- place holders for interim results
     v_z as rolldown_bk2,
     'SRM'  as finance_method, -- audit for financing_rate queries
     'Y              ' as r_srm_flag,    -- Indicates value from SRM, stale these should not be updated at any point
     'Y              ' as o_srm_flag,
     'Y              ' as c_srm_flag,
     'Y              ' as f_srm_flag
from  sec_tab_sdb s,
  sr_measures srm,
  sec_sw sw
where s.ssm_id = srm.ssm_id
and   s.ssm_id = sw.ssm_id;
insert into  pco_on.rd_rolldown_new1
select s.ssm_id,
        nvl(srm.rolldown,0) as rolldown,    
        v_z as oas,                     
        v_z as carry,                          
        v_z as finance_rate,                           
        v_z as price_drop,
        sw.heldby_pco_sw,
        v_z as rolldown_bk1,             -- place holders for interim results
        v_z as rolldown_bk2,
        'Y              ' as r_srm_flag,   -- Indicates value from SRM, stale these should not be updated at any point
        'Y              ' as o_srm_flag,     
        'Y              ' as c_srm_flag,     
        'Y              ' as f_srm_flag,     
        'SRM'        as  rolldown_method
from  sec_tab_sdb s,
  sr_measures srm,
  sec_sw sw
where s.ssm_id = srm.ssm_id
and   s.ssm_id = sw.ssm_id;
end;

try this please
INSERT ALL
INTO RD_CARRY_NEW1 VALUES
    SSM_ID,
    ROLLDOWN,
    OAS,
    carry,
    finance_rate,
    price_drop,
    heldby_pco_sw,
    rolldown_bk1,
    rolldown_bk2,
    r_srm_flag,
    o_srm_flag,
    c_srm_flag,
    F_SRM_FLAG,
    rolldown_method
INTO RD_FINANCE_NEW1 VALUES
    SSM_ID,
    ROLLDOWN,
    OAS,
    carry,
    finance_rate,
    price_drop,
    heldby_pco_sw,
    rolldown_bk1,
    rolldown_bk2,
    r_srm_flag,
    o_srm_flag,
    c_srm_flag,
    F_SRM_FLAG,
    rolldown_method
INTO PCO_OWN.RD_ROLLDOWN_NEW1 VALUES
    SSM_ID,
    ROLLDOWN,
    OAS,
    carry,
    finance_rate,
    price_drop,
    heldby_pco_sw,
    rolldown_bk1,
    rolldown_bk2,
    r_srm_flag,
    o_srm_flag,
    c_srm_flag,
    F_SRM_FLAG,
    rolldown_method
SELECT s.ssm_id,
  NVL(srm.rolldown,0) AS rolldown,
  v_zero              AS oas,
  v_zero              AS carry,
  v_zero              AS finance_rate,
  v_zero              AS price_drop,
  sw.heldby_pco_sw,
  v_zero            AS rolldown_bk1,
  v_zero            AS rolldown_bk2,
  'Y              ' AS r_srm_flag,
  'Y              ' AS o_srm_flag,
  'Y              ' AS c_srm_flag,
  'Y              ' AS f_srm_flag,
  'SRM'             AS rolldown_method
FROM sec_tab_sdb s,
  sr_measures srm,
  sec_sw sw
WHERE s.ssm_id = srm.ssm_id
AND s.ssm_id   = sw.ssm_id;

Similar Messages

  • HT1660 how can I use one single library for all users on the same laptop?

    how can I use one single library for all users on the same laptop?

    You are most of the way there. Each user having access to hard drive is the key. If users are limited in file privileges this is harder.
    Any files you add to your library and any files she adds to her library are available to the other. Just not automatically. Each user must add the files to their own library using the add file or add folder option from menu bar.
    What I have done is set library location to a location outside of My Documents\My Music. On my network storage I have a folder names s:\itunes. Both accounts iTunes are set to use this location for the library.

  • Single invoice for multiple DO & Output for the same!

    Dear Gurus,
    I have configured an output type for Export & its for Collective billing,where we have a contact,a sales order and multiple Outbound deliveries but have one collective billing for multiple DOs.
    Here the issue is :-
    1-when i go for collective invoice ,it does not generate a single invoice with all DOs
    2-thus due to which output too is not getting generated.
    I want the settings needed for collective invoice & output type for this export invoice.
    Regards
    Swati Bhatt

    Hi,
    !- Combination criteria in billing is different (gives two diff nos.)
    In copy control at item level DATA VBRK/VBAP assign routine 001(SAMPLE INVOICE SPLIT)
    2-Number of foreign trade data is diff again.
    Check foreign trade data, It should be same in all delivery document
    kapil

  • How to Park the single invoice for multiple purchase orders

    Hi,
    How to Park the single invoice for multiple purchase orders?

    brother this is possible to enter one Invoice fro multiple purchase order.
    call transaction MIR7, select " purchase order/Scheduling Agreement" from the PO refernce Tab. then click on arrow. give your purchase orders here.
    Thanks

  • Single invoice for multiple orders with different divisions

    Dear All,
    while I am trying to do single invoice for muliple orders with different divisons invoice is gettting splitted..In copy control vbrk routine I  tried with 003 and 007 etc..but result is same..what configuration need to be done for getting the single invoice
    Thanks In advance
    Regards
    CNRNAIR

    Hello
    single invoice for multiple orders with "different divisions" invoice is getting split
    FYI - Different Division means different Sales Area.
    So, sales doc (whether sales order, Delivery & Billing) is applicable to EXACTLY one sales area.
    Thus, combining docs with different sales area is practically impossible.
    Provided, you are using common division.
    Hope this assist you,
    Thanks & REgards
    JP

  • Single invoice for multiple payment terms

    Hi Friends,
    I have given 2 different payment terms for 2 line items in single order and the billing is splitted due to this reason. I want to know where the system is checking this control. Because I want to create single Invoive even the payment terms are different. (The routine 003 under Data VBRK/VBRP in SO to Bill copy controls will be usefull only to create single Invoice for multiple SO's where the payment terms is same). But I need to create single Invoice even for multiple payment terms.
    Can anyone suggest me at the earliest please.
    Kumar

    Hi Kumar,
    The Billing Split is take care at Copy control level.
    For multiple line items in one single SO, with different Payment terms is not acceptable as per the  business logic and its not best practices.
    Please suggest the business to go on Split method only.
    Or
    Try to use Proforma Invoice Concept.
    Regards
    Srini

  • Single invoice for Multiple Purchase Orders

    Hi,
    How to Park the single invoice for multiple purchase orders

    brother this is possible to enter one Invoice fro multiple purchase order.
    call transaction MIR7, select " purchase order/Scheduling Agreement" from the PO refernce Tab. then click on arrow. give your purchase orders here.
    Thanks

  • Reg:Single Check for Multiple Vendors

    Hi Experts,
    I want to Issue a Single check for all vendor open items...
    For this is I created one Group Key and assigned in the vendor master record, but while doing the payment separate check issuing for each vendor,
    any idea

    Hi,
    Can you check the below thread of urs.
    [Reg:Single Check for Multiple Vendors]
    In addition to the above, please make sure that in OBVU, the check box separate payment for each ref is deselected for your questioned comapny code.
    You would have continued your earlier thread instead, rather than a new thread.
    Thanks,
    Srinu

  • One skype number for multiple users in Skype Manag...

    Is it possible to get one Skype-in phone number and assign it to multiple members in Skype Manager?
    If so, how do I go about it?
    I also asked this here: http://community.skype.com/t5/Skype-Number/One-skype-number-for-multiple-users-in-Skype-Manager/m-p/...

    You could always allocate a number to multiple business accounts in Skype Manager. Then re-direct the number via IP-PBX to go to different extensions.
    Try the following here [If you look in the advanced section of this manual, you'll see an example of two accounts using one number]
    http://download.skype.com/share/business/guides/skype-connect-user-guide.pdf
    7.5 Online Numbers for incoming calls
    You can use both business Skype accounts and Online Numbers simultaneously on a
    single SIP Profile if you wish. In other words, you may have multiple business accounts
    and Online Numbers added to one SIP Profile at the same time.
    7.5.1 Adding an Online Number to your SIP Profile
    Shows you how to setup such
    Thanks,
    Kent C.

  • One billing document for multiple deliveries which are for different PO

    Hi All,
    I have a scenario where i need to create one billing document for multiple deliveries.
    Payer is same
    Ship-to is same
    PGI date different
    Sales area is one
    PO different
    In standard SAP it will create seperate billing document for different PO
    Please advice if there is a different copy routine which will combine all the POs in one billing document.

    Hi Mr. Bhat,
    Go to VTFL --> Select the combination of your delivery type and billing type --> Double click at Item(Left side) --> Select your item category --> Click at details
    In the feild "Data VBRK/VBRP" --> I think the routine assigned is 601 (Inv.split - PO Num.) --> Now change it to 3 (Single invoice)
    Then try your process, Hope it helps.
    Regards,
    MT

  • One skype number for multiple users in Skype Manager

    Is it possible to get one Skype-in phone number and assign it to multiple members in Skype Manager? If so, how do I go about it? I also asked this here: http://community.skype.com/t5/Skype-Number/One-skype-number-for-multiple-users-in-Skype-Manager/m-p/3275656#M14366.

    You could always allocate a number to multiple business accounts in Skype Manager. Then re-direct the number via IP-PBX to go to different extensions. Try the following here [If you look in the advanced section of this manual, you'll see an example of two accounts using one number]http://download.skype.com/share/business/guides/skype-connect-user-guide.pdf 7.5 Online Numbers for incoming callsYou can use both business Skype accounts and Online Numbers simultaneously on a
    single SIP Profile if you wish. In other words, you may have multiple business accounts
    and Online Numbers added to one SIP Profile at the same time. 7.5.1 Adding an Online Number to your SIP ProfileShows you how to setup such Thanks,Kent C.

  • One dunning letter for Multiple Customers

    Hi SAP Gurus,
    In dunning i want to create one dunning letter for Multiple Customers, what necessary  settings that i have to do.please help me.
    Thanks in Advance.
    RAVI

    If it is single email address for all the customers of a sales organization, then you can maintain the email address at the sales organization level in t.code OVX5. If SPRO side change is not allowed, then you either maintain in SO10 text, or alternatively you can think about adding it in Z-table if it is easy to maintain and available in your system.
    Regards,

  • Single PDF for Multiple transactions

    Hi,
    As of now we are getting multiple PDF files for Multiple transactions in the single extract file. But is there any possibility to generate single pdf file with all the transactions. Im not sure where we need to change in the FSISYS.INI file. Can anybody help on this. Is there any option like that???
    we are using 11.4 environment and input is an extract file. Please let me know if any details required.
    Many Thanks,
    Vamshi Mundla.

    Hi,
    I am just trying to give some additional information on this one. Here is a snippet from the PDF handbook.
    Option:
    SpoolBatches Enter Yes to tell the PDF Print Driver to print an entire batch of transaction to a single PDF file. The default is No.
    Please do keep in mind...
    • To create a linearized PDF file (for page-at-a-time downloading), you must set this option to No.
    • If you are using single step processing, you must set this option to No.
    In addition to this, you must also turn off the MultiFilePrint callback function. To do this, remove or comment out the CallbackFunc option. Here is an example of commenting out the CallbackFunc option:
    < Print >
    ; CallbackFunc = MultiFilePrint
    You cannot generate linearized PDF files if you set the SpoolBatches option to Yes because when linearizing, the PDF Print Driver must have the entire contents of the PDF
    file in memory. Since batches can be very large, it is not practical to keep an entire batch in memory.
    Important point for your reference:
    I just went through the FAQ in the below link and understood that there are some problems when you try to create a single PDF for a batch as a whole - Acrobat Reader only display the first transaction in a PDF file which contains multiple transactions.
    FAQ Book link -> http://download.oracle.com/docs/cd/E16256_01/faq_book.pdf
    PDF Handbook -> http://download.oracle.com/docs/cd/E16256_01/pdf_book.pdf
    I did not get a chance to explore much on this. Please explore if it helps. Thank you.

  • Single  bill for multiple connections

    Dear All,
    Is it possible to print single bill for multiple connections ? This is my requirement Customer X having 2 connections for Water and 2 connections for Electricity.But we need to bill Electricity and water in a different bill ,but 2 connections for water and 2 connections for electricity should be billed in a single bill.We have created a separate contract accounts for 4 connections.
    Pls guide...
    Best Regards
    Jay

    Hi,
    I am not sure, if i completely understand your requirement.
    But as per my understanding, you have 4 installations, ( 2 for Water and 2 for Electricity) and you want to have a single invoice created for Electircity and water.
    So, its better to create a single contract account with multiple contracts.
    If you are creating multiple contract accounts, then it would create multiple invoices (one per contract account - regular scenario). So, please have a multiple contracts with single CA.
    Also, if you want to invoice all the contracts together, please find the option on contract for joint invoicing. (option 1).
    And, in case you want to bill two connections of electricity as one entity and two of water as one, so in this case, have two contract accounts one for Electricity and one as a part of water. And assign all the electricity contract to one CA and rest of water to another CA.
    Invoices are always created at contract account level and the billing documents are created at contract level.
    Hope this helps !!
    Regards,
    Rajesh Popat

  • Best way to insert millions of records into the table

    Hi,
    Performance point of view, I am looking for the suggestion to choose best way to insert millions of records into the table.
    Also guide me How to implement in easier way to make better performance.
    Thanks,
    Orahar.

    Orahar wrote:
    Its Distributed data. No. of clients and N no. of Transaction data fetching from the database based on the different conditions and insert into another transaction table which is like batch process.Sounds contradictory.
    If the source data is already in the database, it is centralised.
    In that case you ideally do not want the overhead of shipping that data to a client, the client processing it, and the client shipping the results back to the database to be stored (inserted).
    It is must faster and more scalable for the client to instruct the database (via a stored proc or package) what to do, and that code (running on the database) to process the data.
    For a stored proc, the same principle applies. It is faster for it to instruct the SQL engine what to do (via an INSERT..SELECT statement), then pulling the data from the SQL engine using a cursor fetch loop, and then pushing that data again to the SQL engine using an insert statement.
    An INSERT..SELECT can also be done as a direct path insert. This introduces some limitations, but is faster than a normal insert.
    If the data processing is too complex for an INSERT..SELECT, then pulling the data into PL/SQL, processing it there, and pushing it back into the database is the next best option. This should be done using bulk processing though in order to optimise the data transfer process between the PL/SQL and SQL engines.
    Other performance considerations are the constraints on the insert table, the triggers, the indexes and so on. Make sure that data integrity is guaranteed (e.g. via PKs and FKs), and optimal (e.g. FKs should be indexes on the referenced table). Using triggers - well, that may not be the best approach (like for exampling using a trigger to assign a sequence value when it can be faster done in the insert SQL itself). Personally, I avoid using triggers - I rather have that code residing in a PL/SQL API for manipulating data in that table.
    The type of table also plays a role. Make sure that the decision about the table structure, hashed, indexed, partitioned, etc, is the optimal one for the data structure that is to reside in that table.

Maybe you are looking for

  • How to make a oval shape in java

    how to make an oval shape in java

  • Error while apply oracle patch 10.2.0.4

    hi.. i am applying oracle patch 10.2.0.4 on my Production system , it generating error E:\oracle\R3D\102\OPatch>opatch apply Invoking OPatch 10.2.0.2.0 Oracle interim Patch Installer version 10.2.0.2.0 Copyright (c) 2005, Oracle Corporation.  All rig

  • External hard drive crashed...need to move iTunes music files

    I had all my music on an external hard drive which recently crashed. Fortunately I did have the library xml file on my laptop hard drive so I still have the library info, playlists, play count, etc. So I used 3rd party software to dump the music file

  • How to work with subquery in properway

    hi all, i am using 11g, my table structure table 1: EQUIPMENT_DETAILS EQUIPMENT_ID     NUMBER UNIT_TYPE     VARCHAR2(100) UNITS_POINT     NUMBER table 2: POINT_EQUIPMENT EQUIPMENT_ID     NUMBER UNIT_TYPE     VARCHAR2(100) POINT_NO             VARCHAR

  • Problem with rollover hotspot behaviors & centering page

    Good Morning, I have reviewed numerous forums and tutorials in search of an answer to my problems but have failed to resolve them. I am hoping that the experts in this forum can assist. Here are my current issues: Cannot seem to apply ANY behaviors t