How to insert into more than one table at a time also..

hi,
i am a newbee.
how to insert into more than one table at a time
also
how to get a autoincremented value of an id say transactionid for a particular accountid.
pls assume table as
transactionid accountid
101 50
102 30
103 50
104 35
i want 102 for accountid 30 and 103 for accountid 50.
thank u

@blushadow,
You can only insert into one table at a time. Take a look here :
Re: insert into 2 tables
@Raja,
I want how to extract the last incremented value not to insert.Also, I don't understand your thread title... which was "how to insert into more than one table at a time also.. "
Insert, extract... ? Can you clarify your job ?
Nicolas.

Similar Messages

  • How can i update more than one table at a time?

    i would like to update more than one table at a time. In Java Studio creator2 how can i do table updation?

    Hi,
    Please go through the below thread might be of help to you.
    http://forum.sun.com/jive/thread.jspa?forumID=123&threadID=51839
    RK

  • How do i insert into more than one table from temp table?

    Hi,
    I have three tables such as temp,stck and stol
    temp table contains data as below. It has 22 columns.
    STOCK     STOCKDESC     ALIAS1     ALIAS2     ALIAS3     ALIAS4     ALIAS5     ALIAS6     ALIAS7     ALIAS8     ALIAS9     ALIAS10     ALIAS11     ALIAS12     ALIAS13     ALIAS14     ALIAS15     ALIAS16     ALIAS17     ALIAS18     ALIAS19     ALIAS20
    bmg667691031      NOWE FINANSE LTD     yy     zz     B282DV3      TESTICKER      te     te1     bmg667691031BM     te     707943W     ex     IR-PRIME     IR-ALTID     IR-BLOOM     NT-PRIME     NT-ALTID     NT-BLOOM     AU-PRIME     AU-ALTID     AU-BLOOM     mm
    AA0098000181      UFACEX HOLDINGS VAR RT DUE 06-30-2010     kk     yy     mm     TESTICKER      aa     ff     AA0098000181GB     bb     031969W     cc     IR-PRIME     IR-ALTID     IR-BLOOM     NT-PRIME     NT-ALTID     NT-BLOOM     AU-PRIME     AU-ALTID     AU-BLOOM     ba
    AC1350Z7M923      CDA GOVT TREAS BILLS CDS- 08-05-2010     ee     ff     gg     TESTICKER      hh     ij     AC1350Z7M923CA     mn     1A1MTLU     op     IR-PRIME     IR-ALTID     IR-BLOOM     NT-PRIME     NT-ALTID     NT-BLOOM     AU-PRIME     AU-ALTID     AU-BLOOM     op
    stck table contains as below.It has six columns. But always first three columns will have values.
    stock_id   stock_code stock_description              stock_type terriory_code preferred code
    1185072     AED                    
    1185073     ARA     CURRENCY ARGENTINA PESO               
    1185074     ATS     CURRENCY AUSTRIAN SCHS     
    stol table contains as below. It has 6 columns.Terriory_code is always empty.
    stock_code        territory_code    stol_type stock_id  stck_code_type sys_entry_date
    AED          0 1185072     0     6/22/2007 3:59:13.000 PM
    ARA          0 1185073     0     6/22/2007 3:59:13.000 PM
    ATS          0     1185074     0     6/22/2007 3:59:13.000 PM
    Now, i want to insert into stck and stol table based on temp table records. constraints to insert into stck and stol tables are as below
    In temp table first column is called stock. This stock has to compare with stck table stock_code. If it is not present in stck table, then it has to insert into stck table with stock_id and stock_description. Here, I need to generate stock_id my self in the code.
    In temp table, column 3 to column 22, i have alias. Each column has to check with stol table stock_code column. For instance, column3 check with stock_code column. Then column4 check with stock_code. If stock_code is not present in stol table, then i have to insert into stol table.
    I need to generate stock,id in the code. How do i perform this insertion?
    Edited by: user12852882 on Jun 12, 2010 2:37 AM

    It can be done using SQL (no loops required)
    insert into stock_table (stock_id,stock_code,stock_description)
    select stock_id,get_stock_code,stockdesc  /* get_stock_code is a function providing stock_code - usually a sequence value */
      from (select t.stock stock_id,t.stockdesc,s.stock_id stock_stock_id
              from temp_table t,stock_table s
             where t.stock = s.stock_id(+)
    where s.stock_id is null;
    insert into stol_table (stock_code,sys_entry_date) /* not clear where other values to be inserted will come from */
    select stock_code,sysdate
      from (select t.stock_code,s.stock_code stol_stock_code
              from (select distinct stock_code
                      from (select alias1 stock_code from temp_table union all
                            select alias2 from temp_table union all
                            select alias3 from temp_table union all
                            select alias4 from temp_table union all
                            select alias5 from temp_table union all
                            select alias6 from temp_table union all
                            select alias7 from temp_table union all
                            select alias8 from temp_table union all
                            select alias9 from temp_table union all
                            select alias10 from temp_table union all
                            select alias11 from temp_table union all
                            select alias12 from temp_table union all
                            select alias13 from temp_table union all
                            select alias14 from temp_table union all
                            select alias15 from temp_table union all
                            select alias16 from temp_table union all
                            select alias17 from temp_table union all
                            select alias18 from temp_table union all
                            select alias19 from temp_table union all
                            select alias20 from temp_table
                           )                                           /* use unpivot instead if you are 11g */
                     where stock_code is not null
                   ) t,stol_table s
             where t.stock_code = s.stock_code(+)
    where s.stock_code is null;
    and think about damorgan's post, you'll never regret it (especially when you will not just think)
    Regards
    Etbin

  • How do I select more than one message at a time for archiving

    I want to archive multiple messages into one archive folder. How do I select more than one message at a time?

    Really appreciate the help. Many thanks

  • How do i add more than one pdf at a time to profile manager books

    How do I add more than one pdf at a time to profile manager books? When I browse to my pdf folder I can only select one pdf at a time. I have 500+ pdf files I need to add. Any help would be greatly appreciated.

    Bucknut wrote:
    I want to add more than one email address to my address book from an email I received. They were in the CC of the email I received. is there anyway to drag them all into an address book group all at once. I hate having to add and address and then having to find the address and then add it to a group. thanks
    no, there is no way to do that, sorry. you need to control-click on every email address one at a time and select "add to address book". if an email is in the address book already that option will not be there.

  • How can I buy more than one item at a time?

    How can I buy more than one item at a time i iPhote fx a book and a calander? It would be nice to place one order and only pay for the shipping once!

    You can't.
    Regards
    TD

  • How do you delete more than one photo at a time on Iphone 3gs camera roll?

    How do you delete more than one photo at a time on the Iphone 3gs camera roll?

    You can't.

  • How do I highlight more than one thing at a time on a Mac please

    how do I highlight more than one thing at a time on a Mac please

    Do you mean items in Finder?
    To highlight (select) a whole block of items :
    - click the top item you want
    - hold down Shift
    - click the bottom item you want
    The whole range from top to bottom will be highlighted
    To select random items :
    - click the first item
    - hold down the Command key
    - click any more items anywhere in the list
    Just the items you clicked will be highlighted
    This technique works also in apps like iTunes, iPhoto, etc.

  • HT5525 How can I order more than one picture at a time in iphoto?

    How can I order more than one picture at a time in iphoto?

    It's also wise to crop the photos to the print size you're ordering so you have control over what portion of the image gets printed.  Otherwise, the image will be scaled so the smaller dimension fills the paper cropping off some of the oither dimension.
    OT

  • TS3899 How do I delete more than one email at a time from my i phone 5C

    How do I delete more than one email at a time from my i phone 5C

    With your Mail app open and the listing of the messages, tap Edit at the top right.  Then check each circle on the left side of the messages to delete.  When you have checked those to delete, tap Trash at the lower right.
    Next tap Mailboxes upper left, under accounts select the account, then for the account tap Trash.  Select Edit upper right, and at the bottom, Delete All, and confirm Delete All and all will be removed at one time.

  • How do I order more than one book at a time?

    I created 10 photo books I would like to order, but when I go to place my order I can only place one book at a time.  I do not want to place 10 different orders.  How do I order more than one book at a time?

    You can't.  Only multiples of the same book can be ordered at a time.  Each individiual book must be ordered separately.
    OT

  • How do you sync more than one itune at a time to your ipad?

    how do you sync more than one itune at a time to your ipad?

    Not sure what you mean?
    More than one song?
    You can sync with one and only one computer/itunes library at a time.  If you sync to another it will erase the current content.

  • When designing, how do I copy more than one field at a time?

    How do I copy more than one field at a time?

    Hi,
    You can use the Ctrl or Shift modifier keys to select multiple form items. Ctrl+click toggles the selected state of the item. Shift+click selects a range of form items.
    Regards,
    Brian

  • How to e-mail more than one photo at a time?

    i am wondering how to e-mail more than one photo at a time from the photo's saved

    With the last iOS update you can add photos while you're typing you email. You just need to touch (as you have to copy/paste something) and the tap add photo. All the time you need.

  • Failed to upgrade more than one table at same time

    Hi
    In Deployment Manager, I failed to upgrade more than one table at same time.
    I tried to hightlight 4 tables and set the default action as Upgrade, and click File/Generate Deploy. It passed the code generation step then I click Deploy, they are all failed with no error message.
    But they are all successful when I upgrade them one by one. Any one has any idea about this?
    For the known reason, we have no choice to do the deployment with action of 'upgrade' through OMBPlus, instead, can only do that interactively through OWB Client. I can't imagine to ask our Production side DBA to upgrade 80 tables one by one. Or I have to use the generated scripts to do the upgrade, which will resulted in 'no deploy status updated' in OWB. Any help will be very appricated.
    The version I'm using is OWB 10g.
    Thanks,
    Daming

    Hi
    First of all, Patrick's solution doesn't work for me. I didn't do cloning and there is no problem when check the WB tables.
    Second, I think your solution is only good for the developing environment just to get tables upgrade via deployment manager. In most cases, when you do a new release on PROD environment you just exp/imp the MDL file from DEV to PROD and any developing is not recommended on PROD. But your approach is trying to manually the DB, and then EDIT the mapping to do the Reconcile and then deploy. Surely you can do that if you have full control on your PROD side. However, in my situation, I have no access to the PROD for the security reason and an DBA Operator of the Client is responsible to implement my Migration process on PROD by himself.

Maybe you are looking for

  • Maximum Size of Hard Drive in Mac Pro (Early 2008)

    What is the Maximum size of Hard Drive that I can install in drive bay 3 or 4? Computer info below: Model Name: Mac Pro (Early 2008) Model Identifier: MacPro3,1 Processor Name: Quad-Core Intel Xeon Processor Speed: 2.8 GHz Number Of Processors: 2 Tot

  • How To Send A Private Message

    A private message is similar to an email. You can send and receive messages from anyone on the Forum without exchanging any personal information. To send a Private Message (or PM): 1. Click on the screen name of the user, you want to contact. 2. The

  • Windows 7 USB 3.0 drivers for Dell inspiron 13 7000

    When I got this laptop (Model P57g, Inspiron 13 7000 year 2014), I got used to windows 8.1. I frequently went on windows 7 PCs and I realized how much better Windows 7 is. So I installed it on my laptop. I have not regretted it at all. So far the onl

  • Authorization for billing block

    Hi All, My requirement is to restrict certain users from changing the billing block in VA01 and VA02 screen. I understand this can be done by doing some authorizations. I also seek the help of some Basis people in my company but in vain. Can anyone h

  • Fix for uneven spacing in horizontal navigation

    ... and I can't figure out why. I've tried making sure the padding was the same, but something isn't quite right and I've been working on it for a couple of hours and still haven't "got it". Can someone look at the following page and tell me why my "