Best way to group data and show details of only last result in group

Hi All! First off, just letting everyone know that this is a great place to explore and learn Oracle - I've learned more here than I have in some classes. Just exploring the forums and searching for an answer leads me to functions that I hadn't otherwise known existed.
Here's what I'm looking to accomplish now... let's say I have a table that holds family information - if two or more persons are related in a family (determined by a separate table) then it should return the person identification and then the details of the group.
For instance, the following data is contained in two tables, the current result follow and then the result I'm looking for...
PERSONS TABLE
PERSON         PERSON_ID           ADDRESS
John Smith     101                     1 Oracle Drive
Jane Smith     102                     1 Oracle Drive
RELATIONSHIPS TABLE
PERSON_ID      RELATEDPERSON_ID
101                 102
102                 101A simple query would result in the following:
WITH PERSONS AS
  SELECT 'John Smith' AS person, 101 AS person_id, '101 Oracle Drive' AS address FROM dual union all
  SELECT 'Jane Smith', 102, '101 Oracle Drive' FROM dual
,    RELATIONSHIPS AS
  SELECT 101 AS person_id, 102 AS relatedperson_id FROM dual union all
  SELECT 102, 101 FROM dual
SELECT
    person
  , address
FROM  PERSONS p
JOIN  RELATIONSHIPS r ON r.person_id = p.person_idRESULT
PERSON      ADDRESS
John Smith      101 Oracle Drive
Jane Smith      101 Oracle DriveI'm looking to generate the following result but I'm not sure how to accomplish this... I'm confident it's something simple.
DESIRED RESULT
PERSON      ADDRESS
John Smith     
Jane Smith      101 Oracle DriveNotice that the address for the related family members is not displayed until the last family member is returned. It would repeat this process for each family.
Thanks everyone for any help you can provide! 11g
Edited by: nage62587 on Oct 16, 2012 8:20 PM

Hi,
nage62587 wrote:
I've done a lot of forum searching and revised my question a bit to hopefully make things a bit clearer... I've taken a query Frank wrote and revised to meet my criteria; Searching the forum (and other places on the web) is great! Not only do you find things yourself, but people on this forum are more likely to help you when they see that you're doing all you can.
If you find something that you try to adapt, post a link to it. Seeing the correct way to adapt it can be very instructive.
essentially, if I can determine what relatives a person has, then I can create a unique "FAMILY_ID" for them - once I have that, it would appear as though I could then use the FAMILY_ID to group their addresses and other info together.
The problem I'm having is that if a RELATEDPERSON_ID is linked to a PERSON_ID (PERSON_ID linked to RELATEDPERSON_ID works great), it assigns them a new FAMILY_ID rather than including them into the correct family.
Here's my sql
WITH PERSONS AS
SELECT 'John Smith' AS person, 101 AS person_id, '1 Oracle Drive' AS address FROM dual union all
SELECT 'Jane Smith', 102, '1 Oracle Drive' FROM dual union all
SELECT 'Jack Smith', 103, '8 Oracle Drive' FROM dual union all
SELECT 'John Doe', 104, '10 Oracle Drive' FROM dual union all
SELECT 'Jane Doe', 105, '10 Oracle Drive' FROM dual union all
SELECT 'Pete Smith', 106, '1 Oracle Drive' FROM dual
,    RELATIONSHIPS AS
SELECT 101 AS person_id, 102 AS relatedperson_id FROM dual union all
SELECT 102, 101 FROM dual union all
SELECT 104, 105 FROM dual union all
SELECT 105, 104 FROM dual union all
SELECT 106, 101 FROM dual
, table_x
AS
SELECT   person_id         AS col1
,        relatedperson_id  AS col2
FROM     relationships
,     got_relatives     AS
     SELECT     col1
     ,     CONNECT_BY_ROOT col2     AS relative
     FROM     table_x
     CONNECT BY NOCYCLE     col1     =  col2
OR  col2  =  col1
SELECT       col1
,       DENSE_RANK () OVER ( ORDER BY  MIN (relative)
) AS family_id
FROM      got_relatives
GROUP BY  col1The result I expect is:
COL1   FAMILY_ID
102     1
106     1
101     1
105     2
104     2
I suspect that whatever you copied originally had the PRIOR keyword somewhere in the CONNECT BY clause.
Here's one way to do what you want:
WITH    all_relationships     AS
     SELECT  person_id
     ,     relatedperson_id
     FROM     relationships
    UNION
     SELECT  relatedperson_id     AS person_id
     ,     person_id          AS relatedperson_id
     FROM     relationships
,     got_relatives     AS
     SELECT     CONNECT_BY_ROOT person_id     AS person_id
     ,     relatedperson_id
     FROM     all_relationships
     CONNECT BY NOCYCLE     person_id       = PRIOR relatedperson_id
             OR          relatedperson_id  = PRIOR person_id
,     got_family_id     AS
     SELECT       person_id
     ,       MIN (relatedperson_id)     AS family_id
     ,       ROW_NUMBER () OVER ( PARTITION BY  MIN (relatedperson_id)
                                  ORDER BY          person_id     DESC
                                )            AS r_num
     FROM       got_relatives
     GROUP BY  person_id
SELECT       p.person
,       CASE
           WHEN  f.r_num  = 1
           THEN  p.address
       END          AS address
,       p.person_id
,       f.family_id     
FROM       got_family_id  f
JOIN       persons      p  ON  p.person_id  = f.person_id
ORDER BY  family_id
,            person_id
;Output:
PERSON     ADDRESS          PERSON_ID  FAMILY_ID
John Smith                        101        101
Jane Smith                        102        101
Pete Smith 1 Oracle Drive         106        101
John Doe                          104        104
Jane Doe   10 Oracle Drive        105        104Obviously, you don't have have to display all the columns I displayed above In your first message, you said you wanted only person and address. In your last message, you said you only wanted person_id and family_id. Change the main SELECT clause any way you wish.
I used the lowest person_id in each family as the family_id. You could use DENSE_RANK if you really wanted to have the families numbered 1, 2, 3, ..., but I suspect you don't really care what family_id is, as long as all the members of the family have the same value.
You relationship table has some symmetrical relationships, such as
SELECT 104, 105 FROM dual union all
SELECT 105, 104 FROM dual union alland some asymmetrical relationships. For example, the only relationship involving person_id=106 is
SELECT 106, 101 FROM dualthat is, there is no mirror-image row:
-- SELECT 101, 106 FROM dual union all   -- THIS IS NOT IN THE SAMPLE DATAI assume there is no significance to that. As long as 101 and 106 appear on the same row, they are in the same family, regardless of which is the person_id and which is the relatedperson_id.
So the first thing I did above was make sure all the mirror-image rows were represented. That's what all_relationships does.
The next sub-query, got_relatives, is probably what you meant to adapt, but you left off the PRIOR operators.
Got_family_id actually does the grouping, and also computes r_num to determine which is the last member of the family. Only that family member's address will be displayed in the main query.
You could combine got_family_id and the main query; you don't really need a sub-query for that. It would be a little less coding, but I wrote it this way because I think it's a little easier to understand and maintain.

Similar Messages

  • Best way to move data and programs to another profile on same Mac?

    Hello,
    What is the best way to move data and programs to another profile on the same Mac? I have a user who's profile is corrupt, I know that most programs will work on both the new and old profile however when trying to copy the Desktop folder, or Documents folder I am getting permissions denied.
    Sort of like weeding a garden, I'm hoping I do not have to pick the data in each folder and copy individually.
    Thanks for your help!
    Johnathon

    This usually means that a configuration or preference file is corrupted.  In this user's /Home/Library/Preferences/ folder locate any preference files associated with iLinc and drag to the Trash.
    I would also check in the /Home/Library/Caches/ folder for a file or folder associated with iLinc and delete as well.
    See if the problem is resolved in the user's normal account.
    It's not that you cannot copy data from account to account, but doing so causes a lot of permissions issues that must be resolved.  The MacFixit article I linked above shows what you need to do after transferring from one account to another in order to change permissions on the "foreign" files to those of the destination account.

  • Which one is the best way to collect config and performance details in azure

    Hi ,
    I want to collect the information of both configuration and performance of cloud, virtual machine and web role .I am going to collect all these details using
    java.  so Please suggest which one is the best way. 
    1) REST API
    2) Azure SDK for java
    Regards
    Rathidevi
    rathidevi

    Hi,
    There are four main tasks to use Azure Diagnostics:
    Setup WAD
    Configuring data collection
    Instrumenting your code
    Viewing data
    The original Azure SDK 1.0 included functionality to collect diagnostics and store them in Azure storage collectively known as Azure Diagnostics (WAD). This software, built upon the Event Tracing for Windows (ETW) framework, fulfills two design requirements
    introduced by Azure scale-out architecture:
    Save diagnostic data that would be lost during a reimaging of the instance..
    Provide a central repository for diagnostics from multiple instances.
    After including Azure Diagnostics in the role (ServiceConfiguration.cscfg and ServiceDefinition.csdef), WAD collects diagnostic data from all the instances of that particular role. The diagnostic data can be used for debugging and troubleshooting, measuring
    performance, monitoring resource usage, traffic analysis and capacity planning, and auditing. Transfers to Azure storage account for persistence can either be scheduled or on-demand.
    To know more about Azure Diagnostics, please refer to the below article ( Section : Designing More Supportable Azure Services > Azure Diagnostics )
    https://msdn.microsoft.com/en-us/library/azure/hh771389.aspx?f=255&MSPPError=-2147217396
    https://msdn.microsoft.com/en-us/library/azure/dn186185.aspx
    https://msdn.microsoft.com/en-us/library/azure/gg433048.aspx
    Hope this helps !
    Regards,
    Sowmya

  • Best way to create tasks and assign to sharepoint groups

    Hi everyone, I have a custom list which contains newsletter info that is to be seen by around 400 groups (they are stores) and then I need them to mark each list item as 'completed'
    I have been trying to figure out the best way to do this and decided to keep the custom list and somehow link it to a task for each item in the list. We have nintex so was thinking of creating a workflow to create a separate task for each group (store) so
    they can mark it as completed.
    Is this the best way to go about it or am I completely off track?
    Basically all I need is a list which contains around 30 items and around 400 groups (stores) which contain users (store staff) to be able to mark items on the list as completed so it recognises that each store has completed each task.
    Thanks

    Hi  ,
    According to your description, you want to find the best way for creating tasks for 30 list items and assigning the task to around 400 groups.
    For the workflow, it is heavy  that  you need to create around 12000 (30*400) tasks .  In my opinion, the best way is to do with a custom timer job. For more information, you can refer to the
    blog:
    http://www.splessons.com/2013/12/create-a-timer-job-in-sharepoint-2013/
    Thanks,
    Eric
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support,
    contact [email protected]
    Eric Tao
    TechNet Community Support

  • Best way to export data with r.t. prompts and have dense dim mbrs on rows?

    Hi All-
    What is the best way to export data with Run time prompts out of Essbase?
    One thought was to use Business Rules with run time variables and DATAEXPORT command, but I came across at least one limitation where I cannot have months (part of dense Time Periods dimension) on rows.
    I have only two dense dimensions: Accounts and Time Periods and I need both of these on rows. This would come handy when user enter Start and End month and year for data to be exported e.g. If start period is Feb 2010 and end is Jan 2011, I get data for all months in 2010 and 2011.
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","402000",14202.24,14341.62,14560,13557.54,11711.92,10261.58,12540.31,15307.83,16232.88,17054.62,18121.76,18236
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","403000",19241,21372.84,21008.4,18952.75,23442.13,19938.18,22689.61,23729.29,22807.48,23365,23915.3,24253
    "CORP1","0173","FY11","Working","Budget","Local","HSP_InputValue","404000",21364,22970.37,23186,27302,25144.38,27847.91,27632.11,29007.39,24749.42,27183.39,26599,27112.79
    where ideally I would need to get the following:
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","402000","Feb",14341.62
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","402000","Mar",14560
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","402000","Apr",13557.54
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","402000","May",11711.92
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","402000","Jun",10261.58
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","402000","Jul",12540.31
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","402000","Aug",15307.83
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","402000","Sep",16232.88
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","402000","Oct",17054.62
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","402000","Nov",18121.76
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","402000","Dec",18236
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","403000","Feb",21372.84
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","403000","Mar",21008.4,
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","403000","Apr",18952.75
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","403000","May",23442.13
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","403000","Jun",19938.18
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","403000","Jul",22689.61
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","403000","Aug",23729.29
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","403000","Sep",22807.48
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","403000","Oct",23365
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","403000","Nov",23915.3
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","403000","Dec",24253
    "CORP1","0173","FY11","Working","Budget","Local","HSP_InputValue","404000","Jan",21364
    Thank you in advance for any tips.

    Have a read of the following post :- export data to sql
    It may give you a further option.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Best way to transfer data between iMac early 2006 and iMac late 2012

    What is the best way to transfer data between iMac early 2006 and iMac late 2012?

    HI, is this for Migrating all data ove, or just File Sharing?
    What OSX version is in he older one?
    Do you have any backup external drive for the older one?

  • Best ways to view data, total records of an application table ie VBAK

    Hi all,
    What is the best way to view data of an application table in the source system?
    I know about SE16....but are there other ways to know details ie the total no of records and different field information about a
    application table ie VBAK in source R3?
    Also, using SE16 when i checked for VBAK and clicked on the "number of enteries" then it showed 0...however
    when i directly checked from the sqlplus then i found about 5000 records in there in VBAK. I am not sure why
    via SE16 it showed 0. Does anybody have any idea what i missed here?
    Thanks...will give points for ur input.
    ak

    I tried "number of enteried" on se16 and it shows 0 enteries without any selection criterion...i cheked by putting relevant time range as well but it shows 0...
    As i told that when i checked VBAK separately via logging to database directly then i did find 5678 rows there.
    Please note that this is a new demo version....so i thought that i first need to activate the table which i did using tcode SE11. Now the VBAK table is active but still via SE16 shows 0 nuber of enteris....
    Can anybody please advise here..
    Thx
    ak

  • I have lightroom 5.7. Now I have apple TV to connect my Mac to the TV scree. I wish to do a slide show on the TV. However, on the Mac, using ITunes to share photos with the TV, I cannot locate all photo files. What is the best way to save the slide show a

    I have lightroom 5.7. Now I have apple TV to connect my Mac to the TV scree. I wish to do a slide show on the TV. However, on the Mac, using ITunes to share photos with the TV, I cannot locate all photo files. What is the best way to save the slide show and put it where the Mac sharing can find it? So far, I made on one folder in Lightroom, put some photos there and I found them easily. Can this be done with a slide show? Please help quickly! Also worried that the photos I put on the new folder are hard to find afterwards, when the show is done. Where do they go when I delete from from the new folder?I am not alone

    Not that I'm aware of. You just export JPEG copies to a folder that you can point iTunes to. For instance, I have created a folder in my Pictures folder called Apple TV. And within that folder I have other folders of pictures that I can choose from in iTunes to share with Apple TV. But there doesn't seem to be any way to share a Lightroom slideshow. If you have laid to create a video file that would probably work. Apple TV is a little clunky in my opinion. Some things are a little more difficult to do now than they were a while back. I probably haven't provided you with much help, but just keep experimenting and I think you will figure it out.

  • Best Way to Stack 2d and 3d in a Composite

    Hey everyone, it seems I'm really on a 3d binge with Photoshop CS6. It's just a blast! Anyway, I'm looking to figure out the best way to stack 2d and 3d items together in the same document, and maximize the editibility...
    I'm working on a digital room setting, and I have part of the room in 3d and part in 2d. So, for example, the walls, ceiling, floor, table, chairs and corner hutch are 3d, but the regular hutch and buffet server are in 2d.
    - The table and chairs need to be in the foreground
    - The regular hutch and server are behind the table and chairs
    - The corner hutch needs to be behind all other pieces of furniture
    So, you may be catching on by now to my little dilemna... I want all the 3D items to have the same lighting and reflect off one another, however, I need the 2d layers to somehow fit "inbetween" the 3d objects. The simple question is, how can this be done? Is there a way to mask the foreground 3D objects so that they appear to be in from of the 2D objects? My only current solution is this:
    - Move the whole 3D layer (the scene layer) all the way to the back
    - Make the final decision on the position of the table and chairs
    - Hide all other meshes in the scene besides the table and chairs
    - Render, so the edges are clean
    - Load the newly rendered 3D layer as a selection (which loads the table and chairs only)
    - Either create a new layer from the selection of the rendered 3D layer, or mask the 3D layer so that the table and chairs appear to be in the foreground
    I didn't anticipate this post being this long, so I apologize,... but as you can assume, the method above means I can no longer edit/reposition/scale the 3D at all, so if there's a better way to stack these room elements I would be extremely grateful to whoever knows how!
    Thanks!
    Andy

    First, I was wrong about layers needing to be hidden to prevent their appearance being included in a new Postcard. I misunderstood something that happened when working with a 3D document a while ago.
    Materials support transparency/opacity. A material has an opacity control that can use a texture. The material opacity percentage is multiplied by the opacity of the texture.
    When a Postcard is created, its default material's opacity control will contain an instance of the texture that's in the diffuse control, which is a PSB file containing the 2D layer (pixels, Shape, Smart Object or Group) from which the Postcard was created.
    Here is an example. Two solid Pyramid meshes and a Postcard of a cloud Shape layer:
    The Shape layer from which the Postcard was created is in the document that can be opened by picking Edit in the dropdown of the buttons highlighted above:

  • What could be the best way to Export data from 11.5.8 instance to 12.1.2?

    Hi All
    What could be the best way to Export data from 11.5.8 instance to 12.1.2?
    Release: 11.5.8
    OS: Oracle Solaris on SPARC (32-bit) verison 9
    DB: 9.2.0.1
    Thanks in advance

    What kind of data you are looking to move?
    Database export/import is only supported for full database export/import and the application release should be the same on the source/target nodes.
    You can move the setup using iSetup or FNDLOAD.
    Thanks,
    Hussein

  • Best way to read data sources in parallel

    Hi,
    I'm looking for conceptual help as I start a project. I am trying to figure out the best way to get data from several sources at different timings and deliver them to a main vi.
    I have 4 systems, which each work well on their own (OK, one doesn't work yet, but let's assume that can be fixed
    One system reads from 2 pH meters on serial ports. The meters are slow to respond, so it takes about 2 minutes to read 4 channels of data. I save these data to a file every 10 minutes
    One system reads from a CO2 meter on the USB port. It reads the data every second, and does some averaging. Every 2-10 minutes, it saves the average to a file and then sends a command to the parallel port to switch the input to the meter.
    The third system reads from 6 valves, each on a serial port. These also take time, probably several minutes to poll all 6. These data will also be saved to a file.
    The 4th system reads a bank of temperature probes on the USB port. These get polled every few seconds and saved to a file every few minutes.
    Now that these individual routines are working, I am trying to create a front end that will display all the data in one place and allow me to set all the parameters from a single place. I would also like the possibility of using the data from one source at another place (for instance, having the output of the temperature probes sent to the pH meters to adjust their calibration). At this point, I get confused as to the best way to proceed.
    It seems like if I just want to read the data from each source, I could simply put all 4 routines together in a single vi (oh, what a mess that would be to read). Maybe I should start this way?
    However, if I want to have any communication between the different data sources, it seems like I will either need to use queues or VI server. I sort of envision a vi that lets me configure the various ports and the file operations and then can turn on monitoring of any or all of the various inputs. Each of them will do their thing at their own time and the main routine will simply display whatever data they deliver whenever they have new data. Fortunately, nothing is particularly time-critical, nor does it need to run fast.
    My questions: Am I correct in how I'm thinking about getting this to work?   Is there a clear choice between queues or vi server? I've looked at several examples of each, but without having done something like this before, it is hard for me to tell which is better.
    Thanks for any suggestions.
    mike

    Hi Mike,
    I think that you are on the right track with your thinking process. You might be able to implement this using queues. I'm not exactly sure how you would do it with VI server since it is just a set of functions that allows you to dynamically control front panel objects, VIs, and the LabVIEW environment. However, there are some great resources available with using queues for this type of application. I'm including the link to another discussion forum that had a very similar question to yours. There is a good example of using queues within this forum post. Also, there is a great example in NI Developer Zone about using queues and some other good ones in the NI Example Finder (just search 'queues' and you should get a few results). I hope this helps!
    Carla
    National Instruments
    Applications Engineer

  • Best way to pass data sets to another program

    Hey
    I want to connect another (maths) program with my java application. Therefore I need to paste data (some kind of tab separated table) to this program.
    I try now to save these data in a separate newly generated file and to pass a command with Java's Runtime.exec() method to this program to read these data. Is this a good idea or might there be better ways?
    If I do so, is there a way in Java to generate some kind of a "temporary" file which will be deleted automatically after usage or is this nothing else than to save it in a common file and delete it afterwards. What's the best way to pass data generally?

    Well, the connection will not be over a network, so I'd rather think it's not a Socket or RMI problem (unless someone convinces me).
    Yes it's very external, it's a C or C++ written program, I don't have any source codes. So far I generated a file for Input command and data, I passed that on to the maths program and returned the output into another file.
    Now I would like to separate the output and like to obtain some tables and graphical things like charts at the output. Do I have to generate three different types of outputfiles? How to store some graphics e.g. some distributions. I thought even of generating a database. I never thought about XML, I don't know if this works for that kind of problem?!

  • Best Way to Load Data in Hash Partition

    Hi,
    I have partitioning by Hash on a Large Table of 5 TB. We have to load Data say more than 500GB daily on that table from ETL.
    What is the best way to Load data into that Big Table which has hash Partition .
    Regards
    Sahil Soni

    Do you have any specific requirements to match records to lookup tables or it just a straight load - that is an insert?
    Do you have any specific performance requirements?
    The easiest and fastest way to load data into Oracle is via external file and parallel query/parallel insert. Remember that parallel DML is not enabled by default and you have to do so via alter session command. You can leverage multiple CPU cores and direct path operation to perform the load.
    Assuming your database is on a linux/unix server - you could NFS load the file if it is on a remote system, but then you will be most likely limited by network transfer speed.

  • Best way to extract data from archived cube

    Hello Experts,
    Can anyone tell me best way to extract data from archived cube.
    Basically I am trying to pull all the data from archived cube and then load it into another brand new infoprovider which is in different box.
    Also I need to extract all the master data for all infoobjects.
    I have two options in my mind:
    1) Use open hub destination
    or
    2) Infoprovider>display data>select the fields and download the data.
    Is it really possible to extract data using option (2) if records are too high and then load it into another infoprovider in new system.
    Please suggest me the pros and cons for the two options.
    Thanks for your time in advance.

    Hello Reddy,
    Thanks a lot for your quick reply.
    Actually in my case I am trying to extract archived infocube data and then load it into new infoprovider which is in different system. If I have connectivity I can simply export data source from archived infocube and then reload into new infoprovider.
    But there is no connectivity between those two systems (where archived cube is and new infoprovider) and so I am left with the two options I mentioned.
    1) Use Open Hub
    or
    2) Extract data manually from infoprovider into excel.
    Can anyone let me know which of the two options is the best and also I doubt on how to use excel in extracting data as excel have limit of no.of records 65536
    Thanks
    Edited by: saptrain on Mar 12, 2010 6:13 AM

  • Best way to export data for a migration

    Hi Oracle Community,
    What's the best way to export data from an Oracle 8i database for it to be suitable for import into an Oracle 10g database?
    What's the best way to export data if it is to go into different rdbms database?
    Thanks, David

    Thanks everyone for all your help. You guys are great.
    There seems to be many good ways to export your data from Oracle into a flat file format, suitable for import into other RDBS': Oracle, mysql, postgresql, etc.
    A few tools where mentioned but using SQL*Plus, which comes with Oracle (And SQL*LDR on the backend, which also comes with Oracle) seem the most straight forward.
    I found this script on asktom.oracle.com to work great, slightly modified here,
    (to Include linesize max, and pipes rather than commas):
    set echo off newpage 0 space 0 pagesize 0 feed off head off trimspool on
    set linesize 32767
    spool payment.txt
    select
    PAYMENT_ID||'|'||
    USER_ID||'|'||
    <more fields her>
    from
    payment
    spool off
    exit ;
    It works great. Rather than making one of these for each table I wrote an perl script called ora_export. http://crowfly.net/oracle/ora_export. It runs in Unix and only requires SQL*PLUS. It creates these four files:
    <tablename>.def # list of table columns and types (SQL*Plus DESC)
    <tablename>_dump.sql  # a script to export the data
    <tablename>.psv # THE DATA (eq. - name|address|etc)
    <tablename>_load.ctl  # SQL*LDR control for ORCL if you need it.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Maybe you are looking for

  • Can I use an optical drive as a backup drive for File History?

    I wish to use a DVD drive as a backup...win now calls it file history... drive.  The flash drives and HDs show up an an option but not the external or internal optical drives.  Can they be used? This question was solved. View Solution.

  • Sharing Internet with windows, connected by ethernet, using mac's airport

    So I have a desktop that doesn't have Wi-Fi and I too cheap to buy anything for it. So I'm trying to use the MacBook's airport to give the Windows internet through the ethernet connecting them both. I went to internet sharing and entered "Share conne

  • Mass Changes to Rate Routing

    Dear All, We were trying to carry out mass changes to Rate Routing, by using CA85N we were able to make changes to Normal routing but not rate routing, in CA85N we were able to select only three types of task lists ie N, S & Q. Also checked in CWEB h

  • How to develop docking windows like the ones in NetBeans?

    Hello, I am looking for the answer to how to develop docking windows like that in NetBeans? I have been going through APIs of NetBeans' source code. I find the package org.netbeans.swing.tabcontrol. And I have tried the demo program in the folder. Bu

  • How to implement an Effect.

    I need to implement a ValidationEffect, is simple, after applied to a control, paints an icon (red x) in POS.TOP_RIGHT. I have not found the documentation necessary to implement its own effect.