Need to add data to the tables in the target

Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production

Hi gurus

Need your help again, I have the following data.

Sample data

create the table parent_mst

(

GRP number (3).

nel number 4

);

create the table parent_dtl

(

GRP number (3).

by number 4

);

Query

with pp as

(

Select double union 100 grp, nel 8000

Select grp 200, nel 7000 double

),

As CC

(

Select grp 100, 200 per Union double all the

Select grp 100, 300 per Union double all the

Select grp 100, 400 per Union double all the

Select grp 200, 400 by double

)

Select *.

pp p, cc c

where p.grp = c.grp;

-Result of the query

GRP, NEL, GRP_1, BY

1008000100200
1008000100300
1008000100400
2007000200400

Now, I want to insert the following data into the parent_mst table.

Need to insert the following data in parent_mst using all of the above data

GRP nel

100 8000

200 7000

Need to insert the following data in parent_dtl using all of the above data

GRP BY

100 200

100 300

100 400

200 400

Please guide. Thank you

Concerning

Shu

Check if it works:

INSERT INTO parent_mst
   (SELECT p.grp, p.nel, p_seq.NEXTVAL
      FROM parents p
     WHERE p.grp IN (SELECT grp FROM childs));

INSERT INTO parent_dtl
   (SELECT c.grp, c.per, DENSE_RANK () OVER (PARTITION BY 1 ORDER BY c.grp)
      FROM childs c
     WHERE c.grp IN (SELECT grp FROM parents));

COMMIT;

See you soon,.

Manik.

Tags: Database

Similar Questions

  • Need help recovering data of the target in real time. Using NI 9233

    I have a cRio-9012 with 9233 module. I have recently setup of the software for the computer and the target. I have also gone through and set up the "NI 9233 start-up scan mode" to use on my controller. However I couldn't really get the execution of vis data. Could I have missed?

    The VI is executed, but it reads zero while I use an accelerometer (Wilcoxon research model 797-33).

    You should consider the specific\ni of Labview\examples\compactrio\module 9233\ examples.

  • Simple Question: Can I add data to the target home page?

    I have a daemon process that I followed and I want to put the vendor, version, start time, path, etc. on the homepage of target. How can I do this?

    As far as I understand it, I can add graphics to the home page of the target and create reports, but I have not found how to do this.

    I use GC 10.2.0.5.

    That is right. The new version of the Guide extensibility should be somewhere online now, or should be available soon. That describes the feature that allows you to put the cards on the home page. Unfortunately, it won't really focus on what you want to do. All that is allowed through this feature is pie charts, histograms and graphs for time series.

    The best solution is probably to create a report with the information that you want, save appears in the homepage of the target instance reports sub-tab.

  • Add data at the end of a specific line in the text file

    Hello

    I'm trying to add data at the end of the last 4 lines of the text file attached with the ' table to add.  4 rows (422.5800 entry), I would add the first entry of the 'Array to add' entry, on the 5th line to add the second entry of the 'Add picture' and so on.  How can I do this?

    Any help will be appreciated.

    Sincerely,.

    hiNi.

    After re-reading your post, I think that's what you really want to start adding after the first 4 rows.

  • Add data in the header of a .wav file

    Hello guys,.

    I seek your help for a small problem that I can't spend during my internship.

    Here's what I want to do: I acquire signals that I write a .wav file. What I would do then is to reopen this .wav file and add data in the header, such as the sensitivity of the microphone for example. I am doing this is because it's one of our program of works, it can resume the pressure vs time signal using this information. I already have the hex code I need to add, but I was not able to determine if such a thing is possible or not after a day of research ideas would be greatly appreciated. I wonder if Matlab might do the trick but I prefer to stay with the 'normal '... screws

    Thank you very much for your help.

    To insert data into the middle of a file, you will need to rewrite the entire file after that point, as Gerd said in the linked post.  I would do the following:

    1. Search for the location you want to put your new piece
    2. Read 65 000 bytes from forward and store in a local cache (shift registers work well for this, or just a wire at this point).
    3. Write your new piece, taking note of how long it is
    4. Give your data buffered less the length of your new song
    5. Read a 65 000 other bytes and put it in a new buffer
    6. Write the end of the old buffer and a part of the new buffer until you get to 65 000 bytes
    7. Repeat 4 to 6 until you reach the end of the file
    8. Update the offsets in the header to match the new locations of piece, since you have moved things

    You can probably do it with both data pads in a pair of registers at offset in a loop.  The 65 000 bytes is chosen for best performance.  You can use other sizes, but your speed can suffer.  Let us know if you encounter any problems.

  • Add data in the dumpfile parameter in command exp

    Hello

    I have installed 10.2.0.1 on windows server 2003.

    I took the backup hot using the command.
    Exp username/pwd FILE=C:\DataBaseBackups\3AMNEO.DMP LOG=C:\DataBaseBackups\3AMNEO.LOG
    which works very well.

    I made a batch file that have this code and that run daily at some point and overwrite existing (i.e. the last day) backup. But I don't want to do.

    I would like to add data with the file name so that every day, it creates a new backup. (No more write existing backup.)

    My goal is to do a daily backup without replacing existing backup automatically.

    Thank you

    Hello

    hope this helps

    http://DBA.ipbhost.com/index.php?showtopic=804

    Concerning
    Mozka

  • How to add data to the table?

    Hello

    As it is in question. Can I add data (new items) in table dynamically? I say my table 1 d is size 3, but I would like to add three items. Should I change size table first?

    See you soon,.

    K

    Hi K,

    Ray is right!

    Maybe this thread will also help you because there are examples of smal

    http://forums.NI.com/NI/board/message?board.ID=330&message.ID=18421&query.ID=288653#M18421

    Concerning

    Jürgen

  • How to add data to the table changed in sql developer at Apex and vice versa

    Hello

    I had tables of database with sql developer. But now, I have modified the database (new tables added + changed the data in the tables). However, in the Apex, I the old database. Is it possible to get the new Apex database with the data of the table changed so this database in both places (sql and apex developer) is exactly the same... Also the other way around.

    Thank you

    The database schema that contains the tables, is it associated with the workspace even you are searching through the APEX product t development?  Why I'm asking is, if they are the same schema, the tables that you MODIFIED should be appear in the sql for APEX workshop part.  Now reports and forms will NOT see the changes (unless you have actually added or updated definitions for column).

    Can you explain what exactly you were doing the SQL Developer to the tables in your schema?

    Thank you

    Tony Miller
    Los Alamos, NM

  • How to add data to the table using Manager POST for restful Apex application

    Hi all

    I managed to create a service application web Manager restful using GET for the Restful service module. I am able to get the data in row on the presentation of a table row id in the application. But I can't find an appropriate example, how the new data in the table can be posted or deleted. I created a POST handler for a URI scheme and look forward on how to proceed. Any help would be really appreciated.

    Source for the POST Manager:

    Start

    insert into ALL_BOOKS values(:id,:book);

    end;

    Also created 2 parameters id and the book.

    Hi jerry2134,

    jerry2134 wrote:

    I managed to create a service application web Manager restful using GET for the Restful service module. I am able to get the data in row on the presentation of a table row id in the application. But I can't find an appropriate example, how the new data in the table can be posted or deleted. I created a POST handler for a URI scheme and look forward on how to proceed. Any help would be really appreciated.

    Source for the POST Manager:

    Start

    insert into ALL_BOOKS values(:id,:book);

    end;

    Also created 2 parameters id and the book.

    Check out the following tutorials OBE, that explains the creation of GET and POST RESTful Web Services and how to use them in the APEX.

    Also what yo mean "looking forward on how to proceed? Do you want to or created for use/consume in your Oracle APEX application hosted RESTful web services?

    If Yes, in your Application, you must create a RESTful Web Service reference -> shared components. Then, create a form/report based on Web Service reference.

    Kind regards

    Kiran

  • Adds data to the binary file as concatenated array

    Hello

    I have a problem that can has been discussed several times, but I don't have a clear answer.

    Normally I have devices that produce 2D image tables. I have send them to collection of loop with a queue and then index in the form of a 3D Board and in the end save the binary file.

    It works very well. But I'm starting to struggle with problems of memory, when the number of these images exceeds more than that. 2000.

    So I try to enjoy the fast SSD drive and record images in bulk (eg. 300) in binary file.

    In the diagram attached, where I am simulating the camera with some files before reading. The program works well, but when I try to open the new file in the secondary schema, I see only the first 300 images (in this case).

    I read on the forum, I have to adjust the number of like -1 in reading binary file and then I can read data from the cluster of tables. It is not very good for me, because I need to work with the data with Matlab and I would like to have the same format as before (for example table 3D - 320 x 240 x 4000). Is it possible to add 3D table to the existing as concatenated file?

    I hope it makes sense :-)

    Thank you

    Honza

    • Good to simulate the creation of the Image using a table of random numbers 2D!  Always good to model the real problem (e/s files) without "complicating details" (manipulation of the camera).
    • Good use of the producer/consumer in LT_Save.  Do you know the sentinels?  You only need a single queue, the queue of data, sending to a table of data for the consumer.  When the producer quits (because the stop button is pushed), it places an empty array (you can just right click on the entry for the item and choose "Create Constant").  In the consumer, when you dequeue, test to see if you have an empty array.  If you do, stop the loop of consumption and the output queue (since you know that the producer has already stopped and you have stopped, too).
    • I'm not sure what you're trying to do in the File_Read_3D routine, but I'll tell you 'it's fake  So, let's analyze the situation.  Somehow, your two routines form a producer/consumer 'pair' - LT_Save 'product' a file of tables 3D (for most of 300 pages, unless it's the grand finale of data) and file_read_3D "consume" them and "do something", still somewhat ill-defined.  Yes you pourrait (and perhaps should) merge these two routines in a unique "Simulator".  Here's what I mean:

    This is taken directly from your code.  I replaced the button 'stop' queue with code of Sentinel (which I won't), and added a ' tail ', Sim file, to simulate writing these data in a file (it also use a sentinel).

    Your existing code of producer puts unique 2D arrays in the queue of data.  This routine their fate and "builds" up to 300 of them at a time before 'doing something with them', in your code, writing to a file, here, this simulation by writing to a queue of 3D Sim file.  Let's look at the first 'easy' case, where we get all of the 300 items.  The loop For ends, turning a 3D Board composed of 300 paintings 2D, we simply enqueue in our Sim file, our simulated.  You may notice that there is an empty array? function (which, in this case, is never true, always False) whose value is reversed (to be always true) and connected to a conditional indexation Tunnel Terminal.  The reason for this strange logic will become clear in the next paragraph.

    Now consider what happens when you press the button stop then your left (not shown) producer.  As we use sentries, he places an empty 2D array.  Well, we dequeue it and detect it with the 'Empty table?' feature, which allows us to do three things: stop at the beginning of the loop, stop adding the empty table at the exit Tunnel of indexing using the conditional Terminal (empty array = True, Negate changes to False, then the empty table is not added to the range) , and it also cause all loop to exit.  What happens when get out us the whole loop?  Well, we're done with the queue of data, to set free us.  We know also that we queued last 'good' data in the queue of the Sim queue, so create us a Sentinel (empty 3D table) and queue for the file to-be-developed Sim consumer loop.

    Now, here is where you come from it.  Write this final consumer loop.  Should be pretty simple - you Dequeue, and if you don't have a table empty 3D, you do the following:

    • Your table consists of Images 2D N (up to 300).  In a single loop, extract you each image and do what you want to do with it (view, save to file, etc.).  Note that if you write a sub - VI, called "process an Image" which takes a 2D array and done something with it, you will be "declutter" your code by "in order to hide the details.
    • If you don't have you had an empty array, you simply exit the while loop and release the queue of the Sim file.

    OK, now translate this file.  You're offshore for a good start by writing your file with the size of the table headers, which means that if you read a file into a 3D chart, you will have a 3D Board (as you did in the consumer of the Sim file) and can perform the same treatment as above.  All you have to worry is the Sentinel - how do you know when you have reached the end of the file?  I'm sure you can understand this, if you do not already know...

    Bob Schor

    PS - you should know that the code snippet I posted is not 'properly' born both everything.  I pasted in fact about 6 versions here, as I continued to find errors that I wrote the description of yourself (like forgetting the function 'No' in the conditional terminal).  This illustrates the virtue of written Documentation-"slow you down", did you examine your code, and say you "Oops, I forgot to...» »

  • Constantly add data to the chart 2D

    Hi I'm going to be very difficult to deal with some great paintings. What I'm trying to do is create a program that monitors the 23 entries of a controller for cRIO. Here is the flow of the program:

    1. the program starts and collects 1 sample per second of each entry and place into a 2D array, which has 23 columns and 10 rows

    2 only collect 10 samples, constantly replace the samples in this array.

    3. once a threshold is crossed any of the entries take the previous table and add it to a different 2D array that contains 360 000 rows and 23 columns.

    4. once the table is inserted permanently add data of each entry in the new table at 100 samples/s.

    5. the big Board has 360 000 lines because the program must be able to record data for one hour if necessary.

    I used 23 separate tables and it worked OK but it was much to ineffective and the program was slow. I can't get data to enter in the right table and I'm pretty frustrated so any help will be much appreciated. Thank you

    Adam

    At least I'd be initialize your berries to the largest possible size that you may encounter. When adding data use the subset of table replace to update the table with your new data. In addition, I would put these paintings in a shift register. Avoid to display an indicator of control to data, do not use local variables or property nodes to access the data. or the other.

    Also, do you need to have all the data in the application while it is running? You can use medium running or other methods to reduce the amount of data, you should keep in mind? May store data to disk and keep only part of it in memory and read only comprehensive data when you need it?

  • Instant orphaned files - need to recover data on the basic disk

    Hello

    I'm sure this has been asked several times before, but how merge content from an instant orphan to the basic disk?

    Reading over there seem to be several different methods to do so.

    I have a virtual machine with three RDM, the virtual machine is running at the wide base VMDK disks but there is a single snapshot file associated with each base VMDK, snapshots do not appear in the Snapshot Manager.

    I tried to change the snapshot. The VMDK files and change the parent CIDs for the basic disk, but still not instant show in the Snapshot Manager.

    Is the best way to stop the virtual machine, remove the inventory and then add it to the inventory, I don't see the shots if the parent CID is correct?

    What is a better method?

    2. turn off then turn off the virtual machine (if it is not already off). Stop the current virtual machine with any Active snapshots.

    3. once the virtual machine is completely turned off, create a unique snapshot of the virtual machine and do not feed upward after this step.

    4 browse your data store for the virtual machine and look for the numbers you hard files. Instant latest should only be a few megabytes, and you want one that is just before that.

    5. go to the command line console and edit the .vmx for your virtual machine in the container for data store. Looking for a similar article to the following for each of your virtual disks.

    scsi0:0.present = "true"
    scsi0:0.fileName = "???-00002.vmdk"
    scsi0:0.deviceType = "scsi-hardDisk"

    You want to change the "scsi0:0.fileName =" section under the same file name that you found in step 4. You will need to repeat this in the file for each virtual disk on your VM.
    Save the .vmx file, overwriting the original.

    6. now, it will be a long process, if the hard files are large (more than 20 concerts) and can last several hours. During this process, you may lose connectivity to your ESX Server on the client of the infrastructure. What you need to do is run the below command from within the container to store the virtual machine data.

    vmware-cmd <your .vmx file> removesnapshots

    7. once the previous step is complete, check your VM settings in client infrastructure and check that your virtual disks are now pointing to the original hard file (does not contain de-00001 etc.). If everything was successful, you should be able to power to the top of your VM.

    8. once the virtual machine is running and check the operation, you can remove the last numbered - 0000x.vmdk that was created from your snapshot in the third stage (should only be a few megabytes). This file must have been ignored by the instant withdrawal because you have changed the .vmx file.

    Question I have is if the basic disk has been changed today I lose all changes today when merging the snapshots (which have not been written to since 18:00 yesterday)- or will be the basic disk back to 18:00 yesterday and lose all changes today?

    If you need to extract data from instant orphans, you know that you can NOT do without altering the current state
    new files from today will still be there - but they are not referenced in the MFT and other pieces are replaced by old data of the orphan snapshot
    If you must do this with a backup...

    or - possibly use a snashot of the RDM, as it is now...

    in any case – which gives good advice is almost impossible without sitting in front of the case

  • Add records in the target table

    Hi all
    I HAV done an interface for a simple source data transfer to the target. When I run it, the records are stored in the target table. Now, I want to launch the interface (for the same or different source table) and add the records to existing records in the target table.

    Kindly guide me, explaining how shud I do the addition in the target table.

    Thanks in advance.

    Hello

    You can use the IKM control add... it will add records...

    Thank you.

  • Update/Add data to a table to CSV

    Hi Experts,
    I am very new to Oracle. I have a scenario where I get a CSV posted in a folder every day. I need to download the same on a table, the csv file may have already existing records which we might want to put up-to-date and also new records, which must be inserted recently. Can someone suggest a best practice for this. IM open to use Perl/Shell scripts. Please let me know.

    Thank you
    Knockaert

    Welcome to the forum!

    Assuming that the file is on the database server...
    Then, you can use an external table and a single MERGE statement to load data from the file.

  • Need to retrieve data from the internal 512 GB sata drive (now removed the MB).

    MUSIC have a 512 GB mb pro with internal chips removed sata disk. I need to get information from the drive (now removed the MB). I expect to get the data via the USB port.  How to do this and with what cable. I have a MB air as replacement.

    Thanks for your help.

    Use this external case: http://eshop.macsales.com/item/OWC/MSTG800U3K/.  I replace in clone disks, data readers, testdrives for new OSXes, etc.  Any 2.5-inch drive, really.

Maybe you are looking for