Finding Dependant Information

Hi all,
I want to display dependant name with thier parent name
desc people_Details
Pers_id,P_name,emp_number,sex,dob
101------ Rajeev -------------1101---------M----2-DEC-1970
102-------SumithaRajeev------------------F----10-Jun-1980
103----John-------------------1002-------M------18-JAN-1965
105------RAJ-------------------1023------M--------23-SEP-1967
106------RenukaRaj----------------------F--------10-MAR-1972
desc people_dep
pers_id,dep_pers_id,status
101----102-------------Spouse
105------106----------spouse
Desired output
EMpno--Parentname DepName--depdob
1101---rajeev -------SumithaRajeev----10-Jun-1980
105-----Raj-------Renukaraj--------------10-MAR-1972
rgds
shrey

try this.
SQL> select emp1.emp_number empno, emp1.p_name empname, emp2.p_name dependent_name, emp2.dob dependent_dob
  2   from (select 101 Pers_id, 'Rajeev'        P_name, 1101 emp_number, 'M' gender, '2-DEC-1970'  dob from dual union all
  3         select 102 Pers_id, 'SumithaRajeev' P_name, null emp_number, 'F' gender, '10-Jun-1980' dob from dual union all
  4         select 103 Pers_id, 'John'          P_name, 1002 emp_number, 'M' gender, '18-JAN-1965' dob from dual union all
  5         select 105 Pers_id, 'RAJ'           P_name, 1023 emp_number, 'M' gender, '23-SEP-1967' dob from dual union all
  6         select 106 Pers_id, 'RenukaRaj'     P_name, null emp_number, 'F' gender, '10-MAR-1972' dob from dual) emp1,
  7        (select 101 Pers_id, 102 dep_pers_id, 'spouse' status from dual union all
  8         select 105 Pers_id, 106 dep_pers_id, 'spouse' status from dual) dependent,
  9        (select 101 Pers_id, 'Rajeev'        P_name, 1101 emp_number, 'M' gender, '2-DEC-1970'  dob from dual union all
10         select 102 Pers_id, 'SumithaRajeev' P_name, null emp_number, 'F' gender, '10-Jun-1980' dob from dual union all
11         select 103 Pers_id, 'John'          P_name, 1002 emp_number, 'M' gender, '18-JAN-1965' dob from dual union all
12         select 105 Pers_id, 'RAJ'           P_name, 1023 emp_number, 'M' gender, '23-SEP-1967' dob from dual union all
13         select 106 Pers_id, 'RenukaRaj'     P_name, null emp_number, 'F' gender, '10-MAR-1972' dob from dual) emp2
14   where emp1.pers_id = dependent.pers_id
15     and dependent.dep_pers_id = emp2.pers_id;
     EMPNO EMPNAME       DEPENDENT_NAME DEPENDENT_DOB
      1101 Rajeev        SumithaRajeev  10-Jun-1980
      1023 RAJ           RenukaRaj      10-MAR-1972
SQL>

Similar Messages

  • Is there any way to find out the dependency information for column of view?

    Does Oracle provide some view / table / pl/sql pkgs to find out the dependency information for column of view ?
    For example, there are two table mytable1 (col1 varchar2(10), col2 date) & mytable2 (col1 varchar2(10), qty int), and there is one view myView as
    select mytable1.col1, col2, qty from mytable1 inner join mytable2 on mytable1.col1 = mytable2.col
    Can I get some information such as myView.col1 is come from mytable1.col, myView.col2 is come from mytable1.col2, myView.qty is come from mytable2.qty
    ?

    I can get the information about the columns list in table/view from ALL_TAB_COLUMNS table, but I wish to know the column in the view is come from which original table's column.
    Is there any way to find it out from Oracle meta data / through any PL/SQL packages ?

  • How to find the dependency information for views?

    Hi All,
    There is reuirement where in we have to find the dependency information for all the tables which are used in particular view...along with remote database connections.. For this we have tried to use following query..
    Select * from user_dependencies
    start with name =’SAMPLE_VIEW’
    connect by prior trim(referenced_name)=trim(name);
    The view consists of three tables :
    Create view sample_view as
    select t1.col1,
    T2.col2,
    T3.col3,
    From
    Table1,
    Table2@prd1,
    Table3@prd2
    Where
    T1.col5=t2.col5
    And T1.col5=t3.col5;
    But the ouptut is :
    name     Type     Reference_name     Reference_type     Reference_link_name
    sample_view     View     Table1     Table     null
    So what will be the magic query which will give the all the tables in the view sample_view??
    Desired result:
    name     Type     Reference_name     Reference_type     Reference_link_name
    sample_view     View     Table1     Table     null
    sample_view     View     Table2     Table     prd1
    sample_view     View     Table3     Table     prd2
    Thanks all in Advance!!

    Thanks all for the help!!
    So right now, inorder to find the dependency informations for views there is no direct query :(
    As per the michaels post, i have developed some query ....just joining the table....which will give the source code of the object... :)
    The query is :
    select view_name,db_link,owner, substr(to_char(text),instr(to_char(text),'.',1,2),instr(to_char(db_link),'@')) as _Final_result_,
    substr(to_char(text),instr(to_char(text),'.',1,2),20),text from (
    select a.view_name,b.owner,a.db_link,dbms_metadata.get_ddl ('VIEW', a.view_name) text
    from (
    select view_name, db_link
      from (select view_name, dbms_metadata.get_ddl ('VIEW', view_name) text
              from user_views ),
           user_db_links
    where upper (text) like '%@' || nvl (substr (db_link, 1, instr (db_link, '.') - 1), db_link) || '%' ) A,
    all_views B
    where
    A.view_name=b.view_name
    and b.view_name='VW_TESTING') The sampe view is :
    create or replace view VW_TESTING
    as select A.F_DRUG_SKEY,B.F_DRUG_ID
    from dma_info.MORE_SOME_FTF_DRUG@info A,dms_prf.MORE_SOME_FTF_DRUG_FACTOR@info B
    where a.F_DRUG_ID=b.F_DRUG_ID and
    rownum<=5 The output of these query is :
    Final_result
    MORE_SOME_FTF_DRUG@info A,dms_prf.MORE_SOME_FTF_DRUG_FACTOR@info B where .F_DRUG_ID=b.F_DRUG_ID and rownum<=5 In short through source code, I am trying to find those object name which are preceding the "@' sign...please let me know if this can be workaround for finding the dependencies of objects in view... :(
    Thanks!!
    Edited by: user8915904 on Dec 28, 2009 11:22 PM

  • Could not find installation information, contact apple care ?

    I am trying to re-install the OS according to the guide and after erasing the harddisk.
    I am using OS X utilities and try to reinstall OS X.
    Then the screen popped up : To Download and restore OS X, your computer's eligibility will be verified with Apple.
    However, the message now I am getting is : Could not find installation information for this machine. Contact AppleCare.
    Any body know how to deal with this ?

    Make sure that your network connection satisfies the requirements for Recovery or Internet Recovery, depending on which you're trying to use. If possible, connect to the router with Ethernet.
    Reboot and try again.
    Connect to a different network, if possible.
    Wait a few hours and try again.
    Make a "Genius" appointment at an Apple Store.

  • Could not find installation information for this machine

    I tried to recover Mac OS X , but got message like this.
    "Could not find installation information for this machine. Contact AppleCare."
    I can not get detailed information of device because there is no system installed on Mac.
    but I remember,It is intel iMac. ver 10.7. core 2 duo.
    How do I install or recover system now?

    Make sure that your network connection satisfies the requirements for Recovery or Internet Recovery, depending on which you're trying to use. If possible, connect to the router with Ethernet.
    Restart the computer and try again.
    Connect to a different network, if possible.
    Wait a few hours and try again.
    Make a "Genius" appointment at an Apple Store.

  • Find deleted information from user_jobs in Oracle 10g

    Hello All,
    I had scheduled a job in oracle 10g to run only once using dbms_jobs.
    I wanted to find out how long the job took ( total_time) and what SQL it was running ( user_job.what) but the information about the job seem to get deleted from user_jobs once the job is completed.
    Is there any other table/ view I can use to find these information?
    Also, will it be possible to query the user_job as of previous time when the data was there? if yes, please also let me know what privilidges and setting is required. Currently, I just have basic developer priviledge.
    Many thanks in advance for any help.

    Information about how long a job took and what SQL it was running is not stored anywhere when you use DBMS_JOB. Once of the nice things about using DBMS_SCHEDULER rather than DBMS_JOB for job scheduling is that DBMS_SCHEDULER automatically logs timing information.
    How long ago do you want to look at the data in USER_JOBS? If you are just trying to look back an hour or two ago, you may be able to use a flashback query. How far back you can go depends on your UNDO_RETENTION setting, the size of your UNDO tablespace, and the amount of UNDO that is generated by your system. The theoretical maximum you could flashback is 5 days, realistically, not many production databases can flashback more than a few hours unless someone has specifically identified the need to do longer-term flashback queries. The default UNDO_RETENTION is only 15 minutes. Plus, you're not guaranteed that you'll be able to flashback (that can be changed, but it's a pretty dangerous change because it will cause the database to stop if you run out of UNDO space).
    Justin

  • HT1338 could not find intallation information for this machine

    i erased my hard drive and was trying to install the new mac ox lion version, but i have this error message:" could find installation information for this machine, contact applecare" i am connected to the internet, i could not find any answer via apple documents and i cant use my mac mini!!! i dont kow what to do, please i need help to intall the mac os or restore my previous version
    I need help

    First question would be:
    did your machine come with Lion or another OS? Did you buy it new or used?  And, if it came with an earlier OS, do you have the install disks? Did you buy Lion from the app store?
    Any helpful suggestions depend on those answers.

  • "Can't find dependent libraries" Query

    I created a sample.dll using VC++ which inturn uses java libraries. I
    was getting 'file.obj : error LNK2001: unresolved external symbol
    __imp__JAWT_GetAWT@8' link error while creating sample.dll even after
    providing jawt.dll path. So used jre/lib/jawt.lib to create the
    sample.dll. I am using this sample.dll to run a java program. While
    running the java program, I am getting the error 'Exception in thread
    "main" ava.lang.UnsatisfiedLinkError: sample.dll: Can't find dependent
    libraries'. If I don't use jawt.lib (by commenting relevant code) to
    create sample.dll, my java program runs fine.
    But I need to use the code relevant to jawt.lib. Any idea how to over
    come Can't find dependent libraries error?

    You need to link against "jawt.lib"
    E.g.
    In VC++ goto
    Projects -> Settings ->Link Tab
    Add jawt.lib to the Object/Library modules and Project Options.

  • I've tried downloading iOS5 several times and after an hour each time I get a message that says my network connection has timed out.  But I can't find any information about "timing out" or how to correct the situation.  Any help?

    I've tried downloading iOS5 several times and after an hour each time I get a message that says my network connection has timed out.  But I can't find any information about "timing out" or how to correct the situation.  Any help?

    Disable your antivirus and firewall, and try again.

  • How to find required information in order to log on Business View Manager?

    After Business Object Client installation successfully, I try to log on Business View Manager, but failed. One pop-up windows(Log on BusinessObjects Enterprise) come and let me put the information as below;
    System:
    User name:
    Password:
    Authentication:
    Could anyone let me know how to find the above required information? Thanks!

    You need to find this information from a person who installed server part of this deployment.
    System: Name of the CMS server
    User name: Administrator or other user name that exist in the Enterprise
    Password: obviously...
    Authentication: type of the authentication setup on the server side for the user you will be using.

  • Error on hover panel of people search result "We weren't able to find additional information"

    In people search result while hovering over all result item, in the hover panel in the middle I can see a message "We weren't able to find additional information".
    I saw a msdn post for the same question in this
    MSDN Link
    but there it is said that "If the person has no authored documents, then it will display this in the hover panel: We weren't able to find additional information."
    But for my case the authored document is also shown.
    Please find in the screen shot below marked in red:
    Did I missed something?

    Can you check for this issue in ULS Log file.
    If this helped you resolve your issue, please mark it Answered

  • Issue while running a custom package:ORA-20100: File o2670336.tmp creation for FND_FILE failed.You will find more information on the cause of the error in request log. in Package PA_OPPORTUNITY_MGT_PVT Procedure modify_project_attributes ORA-20100: File o

    Hi Guys,
    We have created a custom package where in we are trying to call the standard API's of Oracle projects i.e PA_PROJECT_PUB.When we are trying to call these APIs we are facing the below issue.
    We have tried testing in two instances ,Initially it worked in both instances.
    Using the same API's multiple times we tested the same data set in these instances.
    For the first few runs it works fine.But when we go on using the same API's again and again for our testing we face now and then the below issue.
    Standard API's
    =========
    add_task
    update_project
    change_structure_status
    create_draft_plan
    Error:
    ORA-20100: File o2670336.tmp creation for FND_FILE failed.You will find more information on the cause of the error in request log. in Package PA_OPPORTUNITY_MGT_PVT Procedure modify_project_attributes ORA-20100: File o2670336.tmp creation for FND_FILE failed.
    You will find more information on the cause of the error in request log. in Package PA_PROJECT_PUB Procedure update_project:ORA-0000: normal, successful completionError while publishing the task
    Please let us know if anyone of has come across the same situation.
    Regards,
    Vijay

    But have issue only with validating invoice batch. I followed metalink ID's 605542.1, 167990.1,261693.1,1088553.1,749491.1, 461271.1 and few more.Was this working before? If yes, any changes have been done recently?
    Please see if these docs help.
    APXAPRVL: Invoice Validation Errors With MSG-00001 and REP-1419 [ID 333305.1]
    Invoice Validation Errors When Others:101505:Non-Oracle Exception Rep-1419 [ID 464125.1]
    Invoice Validation Fails with REP-1419 Error in Ap_approval_matched_pkg.Execute_matched_checks [ID 293425.1]
    Invoice Validation Failing On Fnd_file Could Not Write To File L0202306.Tmp [ID 461520.1]
    Invoice Validation (APPRVL) Errors ORA-20001 APP-SQLAP-10000 PSA_FUNDS_CONTROL_PKG.glxfck [ID 463184.1]
    Validate Invoice Error With ORA-20001: APP-SQLAP-10000: AP_FUNDS_CONTROL_PKG.Calc_QV [ID 432702.1]
    Invoice Validation Program Is Erroring Out [ID 382844.1]
    Error On Validation Of Invoices From Previous Periods [ID 412814.1]
    Thanks,
    Hussein

  • Could not find installation information for this machine contact applecare

    I installed Lion on my MacBook, worked great. After 2 months I wanted to clean install the Lion on the same Macbook; went to Apple Support website and there they had instructions on how to clean install Lion.
    I followed the instructions and erased the partition where the OS Lion was installed. Then I tried to re-install it, it kept saying "could not find installation information for this machine contact applecare".
    When I contacted apple care, they asked me to pay 49 dollars in order to get help from them. I already paid the cost for the LION OS and now they want another 49 bucks. This is just insane. I'm not a fan of Apple, Mac or iCrap. But I was thinking to buy a new Mac after selling this one. Now I have no interest in buying any Mac product. Windows 7 is much much better than Lion OS X.
    I have to fix this before I sell it on ebay so Has anyone tried to clean install Lion ?

    I'm with you, OS X Lion has turned a lot of stomachs.
    Here's how to go about what you need to do:
    Get out your 10.6 installer disk, make sure it's clean and polished (bit of rubbing alcohol and a very soft cloth)
    Get 2 blank external drives, connect one and hold c and boot off the 10.6 installer disk, use Disk Utility to format the external drive use
    Erase>Security Option> Zero all data, wait
    under the partition tab
    1 partition, option MBR, format FAT
    Disconnect and reboot.
    Repeat the same procedure for the second drive and format the
    Erase>Security Option> Zero all data, wait
    under the partition tab
    1 partition, option GUID, format OS X Extended Journaled
    Quit and install 10.6 on the external GUID drive.
    Reboot holding the option key, you can boot off the 10.6 external drive, setup, use your same user name as before, update to 10.6.8, grab your files off the OSX Lion partition, transfer a copy to the FAT formatted drive.
    What you do is your choice,
    To continue using the machine under 10.6
    you can erase the entire (select the whole internal drive, not just the OS X Lion Paritition) and use Carbon Copy Cloner to clone 10.6 external to the internal drive,
    To sell the machine with a fresh 10.6 install
    or simply hold c boot off the 10.6 installer disk and install 10.6 on the internal drive and upon reboot, just hard shutdown by pressing the powerbutton before going through setup. The next person who gets the machine will be greeted by the setup again.
    You can use the files on the FAT drive on your Windows PC in some cases.
    Else download the free LibreOffice and it can read quite a few file formats.

  • Could not find schema information for the attribute 'filename'

    Can anyone help me.
    I download the VB.NET sample source and try to run the application and got this error.
    "Could not find schema information for the attribute 'filename'"
    and
    "Could not find schema information for the attribute 'url'"
    and
    "Custom tool warning:Schema validation warning:Schema item 'element' named 'AccountWS_AccountUpate_Input' from namespace 'urn:crmondemand/ws/account/' is invalid. Namespace 'urn:/crmondemand/xml/account' is not available to be referenced in this schema"
    Thanks
    Pitiporn

    Are these errors or warnings? If warnings, you should be able to just ignore them.

  • Could Not Find Installation Information for this Machine" I need Help!

    i accidentaly erased the main drive and now i am trying hard to reinstal the OS X again but i constantly keep seeing this "could not find installation information for this machine" i need help....

    hello,
    I had the same problem yesterday, just go to a place with a better internet conncetion, it will work fine...
    good luck

Maybe you are looking for

  • My computer wont let me have bought songs on my iPod

    Before i was able to have bought songs be synced but now it wont let me have my songs on my iPod. When i press "sync" it responds "some of the songs in your iTunes libary, including 'When i grow up' were not copied onto the iPod 'Meghan's iPod' becau

  • Skype Failed to install error 1603 after windows r...

    Hey everyone! Thanks for any help in advanced. Honestly after losing access to an old account and making a new account I've still been a long time fan of skype and love free 1 on 1 video calls. I'm really hoping this is an easy fix because honestly I

  • Help setting node height in a JTree

    I have a JTree in which i would like to make the font of the nodes somewhat large (size 16). However, by setting the node's font to this size, i notice that the top and bottom of the node values are truncated. I was wondering how i could increase eac

  • Vision M Detection prob

    Hi, I needed to reinstall my Audigy 2 sound card drivers because I was having a problem with EAX sound which I did and resolved but since then my computer seems not to recognise my zen vision M which is odd because they are unrelated. When I plug it

  • About the AddXmlDeclaration feature on XML assembler

    I created an application that sends messages using the XML assembler component. This component features a property that might be enabled if we would like to set the xml declaration (?xml version=1.0?) on top of the document. By default the declaratio