algorithm: show the relationships between the 2 data tables.

I want to see '-connection path "between 2 tables given.
Relationships of sample table:

1 table a (ID)
2. table B (ID A_ID), column "A_ID" has forced foreign key pointing to the column "A.ID.
3. table C (ID, B_ID), points of 'B_ID' of column to column B in the table identifier.

Entries in the algorithm: 'A' and 'C '.
Outputs of the algorithm:
' (1) ' has '-of > 'B '->' C '.

So put shorty that I give two strings as input to table names and identify those unique 2 lines in the table "user_tables. Now, these 2 tables have constraints of foreign keys pointing to some other tables in the database and possibly go through these pointers, so that we can draw 'A-> B-> C'. The relationship is defined somehow wuth series of paintings:
USER_CONSTRAINTS
USER_CONS_COLUMNS.

How can I write this request carefully to see if 2 tales given have a relationship and how this relationship looks like, maybe there is way-table "B" or maybe C just of points in A.

A very simple query, as bernyo said: use a hierarchical query:

    SELECT LEVEL, Parent_Table, Child_Table
      FROM (SELECT DISTINCT C2.Table_Name Parent_Table, C1.Table_Name Child_Table
              FROM Dba_Constraints C1, Dba_Constraints C2
             WHERE     C1.Owner = 'MYSCHEMA'
                   AND C1.Constraint_Type = 'R'
                   AND C2.Owner = C1.Owner
                   AND C2.Constraint_Type IN ('P','U')
                   AND C2.Constraint_Name = C1.R_Constraint_Name
              )
START WITH Parent_Table = 'MY_TABLE1'
CONNECT BY PRIOR Child_Table = Parent_Table;

: p

Tags: Database

Similar Questions

  • Calendar shows the wrong date in my dock

    The calendar in my dock icon is showing the date of December 30, yet when I open the app it shows today's date. How do I change so the icon displays the current date?

    You can remove the dock by clicking on it and keep. Drag and then click docking station and the United Nations. Then go to top go to menu and open applications. Right click on the calendar and then create aliases. Insert the alias in the dock.

  • Why my iTunes office showing the time / date that I played in the last video on my iPad Air even though I have never synchronized them?

    For some reason any, whenever I watch a movie on my iPad Air, the installed iTunes on my desktop (iMac end 2012) shows the date and I watched it - even though I've never synchronized the two devices.  It's a little scary; does anyone have an idea why this phenomenon happens?  I don't have any app as installed remotely.  The operating system is fully updated on the iPad and iMac.  FWIW, my ipad is only wi - fi enabled.

    Library of music to iCloud?  (if you subscribe to iTunes game or music from Apple)

  • OBIEE 11.1.1.6.6 - analysis shows the two dates instead of a guest

    Hi all

    my analysis shows somehow the two dates instead of a guest.

    How can it be?

    Tell me please what additional information should I include for you to help me.

    OBIEE 11.1.1.6.6

    UPD: prompt screenshots

    http://Marchello.CCX-grads.org/IMG/BI_prompt_001.PNG

    http://Marchello.CCX-grads.org/IMG/BI_prompt_002.PNG

    I started to use the dashboard to display analysis, now issue additional date disappeared.

  • from the opening, does not show the current date, need to manually refresh the page

    initially the opening firefox, it does not reflect the current date. I have to refresh the screen to go to the current date.

    This has happened

    Each time Firefox opened

    is past week or two, cause unknown

    A possible workaround is to use to remove the navigation, search and download history on Firefox to clear the cache of the browser on the output. That will make Firefox load pages from the server instead of using the version in the cache.

  • I have a Camcorder HDR-SR7E showing the error data and buffer overload

    White screen appeared in the viewfinder while recording, first say "overload buffer", then "data error".

    Camera stopped and the data has been lost.

    It was suggested that this is linked to he left the sensor function, but the camera was not dropped.

    Audio input can cause a similar effect?

    Restarted the camera and continued to film with recd showing in the viewfinder as normal, but no data stored after camera.

    It's hiding somewhere? I downloaded all the sequences that was captured, but a large part is missing in the middle of this filming session. Gems of explanation would be welcome.

    Hi MelA,

    This problem occurs when the camcorder detects the shock caused by a continuous noise or whipped milks, and internal protection system is activated to stop the recording on the hard disk. When recording in an environment that has continuous sound hard or milk whipped, as in a concert hall live or on a bike, please keep the camcorder from the source noise or shake as much as possible.

    However, since you also see the DATA error message, it is possible that the data on the media (internal hard drive or memory stick) is maybe damaged. If you save a memory card holder itself could be counterfeit. To verify that the media is able to work properly, it will be necessary to format the media. Formatting the hard drive or the memory card will erase all data on the media.

    The Camcorder HDR-SR7E is a European model. Our community is the community of English language outside of Europe. If formatting support does not resolve the problem, the service will be required. You can contact the support of Sony in Europe to set up a repair for your camcorder. For your comfort the support pages for your camcorder here are according to the country of origin.

    http://www.Sony.co.UK/support/en/product/HDR-SR7E

    If my post answered your question, please mark it as an "accepted Solution".

  • Export to spreadsheet does not show the formatting data Validation rules

    Currently in Hyperion Planning 11.1.2.3, have basic color formatting based on Data Validation rules. However, when you use the option export to a worksheet, the Formatting disappears.

    Understand the connection to Hyperion planning is kept only on Smart View, if she will not apply export on the worksheet?

    Thank you

    Mauricette

    I think that the formatting will be lost during the selection of the option export spreadsheet because it is about a raw format, if you want to format would be preferable to use the Smart View method.

    See you soon

    John

    http://John-Goodwin.blogspot.com/

  • OBIEE11.1.1.5 showing the meta data dictionary

    Hello world

    I'm a little stuck on the implementation of a dictionary of metadata on 11.1.1.5. (Windows) I saw some post on the net, but everyone seems to be copying someone else...
    Here's what I did to the extent that:

    -On the file system, I made a folder called d:\OBIEE_META
    -added a WEB - INF folder
    -In the console, I made this available as a Web Application Directory
    -administration tool I made a datadictionary meta export and placed in the OBIEE_META folder
    -J' checked if she was available > > http://localhost:7001/OBIEE_META/BISAMPLE4/NameIndex.xml
    -J' added to my Instance configuration file:
    < SubjectAreaMetadata >
    < DictionaryURLPrefix > http://localhost:7001/OBIEE_META/< / DictionaryURLPrefix >
    < / SubjectAreaMetadata >
    -Restart of the system
    -A all access metadata in user management

    Now, here's the problem:
    I see the button of meta data, but it is grayed... (metadatadictionary_dis.png)

    Stuff where I was wrong or you have forgotten something?

    Concerning

    John

    http://www.obiee11g.com

    Hi John

    I think you just click on the name of the topic area in the left panel then the icon become active. Nothing wrong with your config that I see.

    See you soon,.

    Paul
    http://total-bi.com

  • My Thunderbird consistantly shows date of tomorrow on the incoming and outgoing emails. even if the system clock and clock Windows indicate the correct date. Help.

    My installation of Thunderbird seems to use a 24 hour clock before the actual time. For example the received messages on December 25, 2014 are dated December 26.

    In addition, when I answered a message entering today, December 25, automated header said that I was responding to a received message on 26 December.

    System clock of my computer and the Windows clock to show the correct date.

    Y at - it no way to force the Thunderbird to read again the system clock, or any other way to reset the time internal Thunderbird?

    Thunderbird uses your computer's clock. There nothing else for reference. I suggest you double check that your clock to the time and time zone. There is no reason to look at the bios to check the computer's clock.

  • Display the master data on the time interval of 5 minutes

    I tried my way, but cannot resolve the requirement of below mentioned desire please help me solve this question please.

    I need to show the presence of the employee, but one record within the interval of 5 minutes of the old time recorded as shown below

    Time                                            EMP_ID

    16/11/2015 10:01:11 193

    16/11/2015 09:55:11 193

    16/11/2015 09:54:18 193

    16/11/2015 09:53:24 193

    16/11/2015 09:52:11 193

    16/11/2015 09:51:18 193

    16/11/2015 09:50:24 193

    16/11/2015 09:49:29 193

    16/11/2015 09:48:38 193

    13/11/2015 09:36:38 190

    13/11/2015 09:33:38 190

    13/11/2015 09:30:11 190

    Power required

    Time                                            EMP_ID

    16/11/2015 10:01:11 193

    16/11/2015 09:54:18 193

    16/11/2015 09:48:38 193

    13/11/2015 09:36:38 190

    13/11/2015 09:30:11 190

    I want to show the minimum date and time with in the 5 minute interval

    Your solution is not what he wants to be (your result set is the same as mine, anyway).  He wants to roll every 5 minutes starting with a given record.  Here's one way:

    with qry (ATIME, EMP_ID) as long as)

    Select to_date('16/11/2015 10:01:11 AM', 'dd/mm/yyyy hh:mi:ss AM'), 193 of union double all the

    Select to_date('16/11/2015 9:55:11 AM', 'dd/mm/yyyy hh:mi:ss AM'), 193 of union double all the

    Select to_date('16/11/2015 9:54:18 AM', 'dd/mm/yyyy hh:mi:ss AM'), 193 of union double all the

    Select to_date('16/11/2015 9:53:24 AM', 'dd/mm/yyyy hh:mi:ss AM'), 193 of union double all the

    Select to_date('16/11/2015 9:52:11 AM', 'dd/mm/yyyy hh:mi:ss AM'), 193 of union double all the

    Select to_date('16/11/2015 9:51:18 AM', 'dd/mm/yyyy hh:mi:ss AM'), 193 of union double all the

    Select to_date('16/11/2015 9:50:24 AM', 'dd/mm/yyyy hh:mi:ss AM'), 193 of union double all the

    Select to_date('16/11/2015 9:49:29 AM', 'dd/mm/yyyy hh:mi:ss AM'), 193 of union double all the

    Select to_date('16/11/2015 9:48:38 AM', 'dd/mm/yyyy hh:mi:ss AM'), 193 of union double all the

    Select to_date('13/11/2015 9:36:38 AM', 'dd/mm/yyyy hh:mi:ss AM'), 190 Union double all the

    Select to_date('13/11/2015 9:33:38 AM', 'dd/mm/yyyy hh:mi:ss AM'), 190 Union double all the

    Select to_date('13/11/2015 9:30:11 AM', 'dd/mm/yyyy hh:mi:ss AM'), 190 double

    )

    Select EMP_ID, ATIME

    (select EMP_ID, ATIME, min (ATIME) on (EMP_ID partition) as START_ATIME,

    min (atime) over (partition by order EMP_ID of ATIME

    range between the minute rest interval '5'

    and unbounded following) as NEXT_ATIME

    of qry)

    Start by ATIME = START_ATIME

    connect by prior NEXT_ATIME = ATIME

    What gives exactly what he wants

    EMP_ID ATIME
    190 13/11/2015-09:30:11
    190 13/11/2015-09:36:38
    193 16/11/2015-09:48:38
    193 16/11/2015-09:54:18
    193 16/11/2015-10:01:11
  • keep the effective date on photo

    I need to upload photos to a society for the protection of deposits in a property dispute, and I need to show the actual date on which the photos were taken.

    For the moment, whenever I have move photos to iPhoto, it now puts on them as when they were created and modified!

    How can I make sure that the date and original time remain on the properties of the photo?

    My friends who use PCs do not experience this problem.

    Thank you

    If you export photos with capture date as the date of creation of the file, export the original not modified and not file the modified version.

    Use "Export file", then select "type: Original.

  • report that shows the same values twice in 11g

    Hi am in report form of oracle 11g I have a report that lists 5 rows, the problem is the same elpse of data on the second page, how do I fix that the request is ok when I run with sql developer, it shows the record 5, the problem is when I run the report he show the same data in multiple pages



    for example


    Page 1


    employeeno employeeename

    Sharon 20000

    Peter 20001


    page 2


    employeeno employeeename

    Sharon 20000

    Peter 20001

    You have an extensible framework around your main frame? For example, when the requirement is to have 2 copies could have a fake request for an extensible framework around your main frame:

    Select 1 as a double

    Union of all the

    Select 2 double

  • Adobe prelude ingest the creation Date changes

    I'm having a problem with Adobe prelude. I shot some interviews last weekend and tried the app iPad prelude Live Logger to construct markers in real time during interviews. I have been very wary of the camera (5Diii) and iPad to exact date/time/time zone schedule.

    I expected it would be easy as a prelude to import the identifier "metadata" iPad newspaper, but I discovered prelude bad reads the file creation Date. In fact, I have no idea where he is at the time of creation of.

    Here's what Finder is properly showing the creation date of the file:

    Screen Shot 2015-11-02 at 11.23.22 AM.png

    But the same clip in prelude shows this:

    Screen Shot 2015-11-02 at 11.24.31 AM.png

    As you can see, good day, wrong time!

    And the error I get when trying to apply this .xmp file Logger live to the clip wrote "the marker... from the associated metadata Panel isn't in the fury of time of the clip... and cannot be added". Which I suppose is because prelude read the bad weather!

    Any ideas?

    Andy Brown

    Adobe prelude 2015.0 CC

    4.0.0 (version 138)

    OS X 10.10.4

    Hi Andyb,

    Thanks to accentuate the problem.

    I confirmed that prelude does not display the correct values for created/modified Date/time.

    I refer to the question within my team. We will probably address this issue.

    Customer feedback is important to us. continue to write in the case of any confusion.

    Thank you

    Mayjain

  • Shows the columns having / sum not zero

    We have a report that HAV total of twenty columns.

    Whenever we run you report (dynamic query) random columns have sum = zero

    We want to show only eachtime the columns having the amount greater than zero.

    concerning

    Jean Marc

    Hi John,.

    OK - I've tested this here [http://htmldb.oracle.com/pls/otn/f?p=267:43]. The report on the left shows/hides the SAL and COMM columns according to totals. The report on the right shows the complete data. Change the Dept to see this implemented.

    There are other methods available, but that's what I did:

    The select dept list (item name is P43_DEPTNO) is simply a list of departments and a NULL option that returns 0 (zero).

    This report is a SQL statement of:

    SELECT EMPNO, ENAME, SAL, COMM
    FROM EMP
    WHERE :P43_DEPTNO = 0 OR :P43_DEPTNO = DEPTNO
    ORDER BY ENAME
    

    I have a region in the position after the header that uses "No. Template" and contains two pieces of Hidden - P43_SAL and P43_COMM.

    I have a calculation of element, running "Before Header", which sets P43_DEPTNO to 0 if it is NULL.

    I have a PL/SQL unconditional process, "to charge - before Header", which has the following code to the currently running process:

    DECLARE
     vSAL NUMBER;
     vCOMM NUMBER;
    BEGIN
     SELECT NVL(SUM(SAL),0), NVL(SUM(COMM),0)
     INTO vSAL, vCOMM
     FROM EMP
     WHERE :P43_DEPTNO = 0 OR :P43_DEPTNO = DEPTNO;
     :P43_SAL := vSAL;
     :P43_COMM := vCOMM;
    END;
    

    And, finally, on the SAL column in the report, I put the Condition Type for 'value of element in the Expression 1. = zero' and the Expression 1 is: P43_SAL. And even on the COMM, but the Expression 1 column: P43_COMM

    When the page is loaded, the process is executed and SAL and COMM totals are calculated and inserted in P43_SAL and P43_COMM. The report runs and conditions check the values of these two hidden items - if a is not null, then the column is displayed.

    Andy

  • The DataProvider data label text

    Hello, I have a table that I add to as follows (dpColours is a table):

    dpColours.push({label:"Black"});)

    This table is then added to a dataprovider that is then added to a drop-down list.

    My question is how can I find the text of a certain element of the DataProvider data table?

    I can't do this: dpColours [0] .text to what I do? I want to retrieve the text 'Black' of the dpColours of the table.

    Thank you

    Noah NAKED

    Hey Noah,.

    just like how you add the 'label' property to the table, you can access the same way. you had the right idea, just need to change the .text to .label and it goes out of the label 'black' property that you inserted:

    dpColours[0].label
    

    also if you want to access the actual data provider, do you the same way. say if the data provider name is "PD" you acceding by:

    dp.data[0].label
    

    hope that things cleared up. Good luck!

Maybe you are looking for