Trying to use ALL_TAB_COLS  to find two tables based on input rows

I'm using 9i.
I'm trying to use the ALL_TAB_COLS table to find two tables that contain columns I can join them on. I know the names of the two tables. We can call them table1 and table2. I just using the columns that are stored in them below to find a common set of tables.
The query I'm using is the following
select distinct did.TABLE_NAME, did.COLUMN_NAME 
from     
    (Select * from ALL_TAB_COLS 
    where column_name in('SO_LINE_ID','SO_LINE_NUMBER', 'SO_ORDER_NUMBER', 'SO_HEADER_ID','AR_CUSTOMER_TRX_LINE_ID')
    --and OWNER = 'FTBV'
    ) did 
join 
    (Select * from ALL_TAB_COLS 
    where column_name in('SCHED_DISTRIBUTION_ID', 'CODE_COMBINATION_ID', 'PRODUCT_BUSINESS_CODE', 'PRODUCT_GROUP_CODE', 'PRODUCT_CODE')
    --and OWNER = 'FTBV'
    ) iii
on did.TABLE_NAME = iii.TABLE_NAME;It's giving me limited results.
What I need is something that can find interim tables that would link my two tables together based on the unique columns I've provided. Does such a query exist?
Thanks in Advance.

Only if there is a defined foreign key relationship. If there is one the queries you want are on the Constraints page of Morgan's Library at www.psoug.org. If they do not exist then you need to find a subject matter expert that can explain the application's design.
The fact that you are asking this question is a strong indication of a lack of proper documentation at your facility: Something you might wish to address.

Similar Messages

  • Spliting a table in to two table based on the groups in SSRS

    Hi,
    I am trying to a split a rows accross two tables based on a group.
    So far I have added a list and added a row group and grouped it using lineof business
    Inside my list i have two identical tables so i can display the data
    for the first table i have set the row visibility as follows: where LineOfbusiness1 is the  groupname of my list group
    =RowNumber(Nothing) >= (IIf(CountRows("LineOfBusiness1")\2 = 1, CountRows("LineOfBusiness1")/2, (CountRows("LineOfBusiness1")/2)+1))
    and for the second table in the i have set the row visibility as follows
    =RowNumber(Nothing)< (IIf(CountRows("LineOfBusiness1")\2 = 1,CountRows("LineOfBusiness1")/2, (CountRows("LineOfBusiness1")/2)+1))
    this set up works fine for the first group but it doesnt display the data the way i want for the subsequent groups.
    so how do i have the table start over after each group... plus in my group i have specified to do a page break after everygroup...
    Any help will be appreciated.
    Thanks
    Karen

    Visakh,
    Thanks for answering.... a sample for the data will look like
    dataset----
    create table #dataset
    Code varchar(5),
    Name varchar(200),
    Lineofbusiness int,
    Statename varchar(10),
    typed int,
    description varchar(2000)
    insert into #dataset
    select 45111,abc,1,AL,4500,policies
    insert into #dataset
    select 45111,abc,1,AL,2500,vehiles
    insert into #dataset
    select 45111,abc,1,AL,3,drivers
    insert into #dataset
    select 45000,bca,2,AL,4500,policies
    insert into #dataset
    select 45000,bca,2,AL,500,house
    insert into #dataset
    select 45000,bca,2,AL,40,theft
    When i display the data i want it to be
    Line of business 1
    policies 4500 drviers 3
    vehiles 2500
    Line of business 2
    Policies 4500 theft 40
    House 500
    but right now the for lineofbusiness 1 its showing the correct way for but the line 2 everything is being displayed in the right.
    Thanks
    Karen

  • Is it possible to find the  table based on the Date ?

    Dear Team ,
    Is it possible to find the table based on the Date ?
    I have created an table ,But forgot the Table Name .
    Is it possible to find the Tables created on particular Date .
    Regards ,
    Augustine

    as date is record the time also below query will work.
    select * from user_objects
    where
    object_type = 'TABLE' and
    to_date(created,'DD-MON-YYYY') =to_date('<your date value in DD-MON-YYYY format>','DD-MON-YYYY');
    Edited by: shaileshM on Feb 24, 2010 9:39 PM

  • How to populate a table based on a row selection from another table.

    Hi, i just started to use ADF BC and Faces. Could some one help me or point me a solution on the following scenario .
    By using a search component , a table is being displayed as a search result. If i select any row in the resulted table , i need to populate an another table at the bottom of the same page from another view. These two tables are related by primary key . May i know how to populate a table based on a row selection from another table. Thanks
    ganesh

    I understand your requirement and the tutorial doesn't talk about Association between the views so that you can create a Master-Detail or in DB parlance, a Parent-Child relationship.
    I will assume that we are dealing with two entities here: Department and Employees where a particular Department has many Employees and hence a Parent-Child relationship.
    Firstly, you need to create an Association between the two Entities - Department and Employees. You can do that by right clicking on the model's entity and then associating the two entities with the appropriate key say, DepartmentId.
    Once you have done that, you need to link the two entities in the View section with this Association that you created. Then go to AppModule and make sure that in the Available View Objects: 'EmployeesView' appears under 'DepartmentView' as "EmployeesView via <link you created>". Shuttle the 'DepartmentView' to the right, Data Model and then shuttle
    "EmployeesView via <link you created>" to the right, Data Model under 'DepartmentView'.
    This will then be reflected in your Data Controls. After that, you simply would have to drag this View into your page as a Master-Detail form...and then when you run this page, any row selected in the Master table, would display the data in the Detail table.
    Also, refer to this link: [Master-Detail|http://baigsorcl.blogspot.com/2010/03/creating-master-detail-form-in-adf.html]
    Hope this helps.

  • How to use common object from two tables with out join.

    HI,
    I have two tables called A & B In A table i have the following objects
    1.weekend
    2.S1(measure)
    3.S2(measure)
    4.S3(measure)
    5.S4(measure)
    And In B table i have followning columns
    1.week end
    2.p1(measure)
    3.p2(measure)
    4.p3(measure)
    5.p4(measure)
    Now in universe i created all the measure objects i.e.s1,s2,s3,s4,p1,p2,p3,p4 A.weekend,B.weekend.
    instead of using week end two times i wnt to use only once because this is common in both table.
    if i use join between these tables i am getting values fine
    But With out join is there any thing to do in universe level to create common objects to use from both the tables..I tried using aggregate awareness but while reporting it is taking as two SQL.which is not synchronized.
    Please help me on this ...

    hi,
    Although  Weekend column is present in both tables, by creating a single Object in Universe, Universe can identify relationship with only table referenced in Object Creation.
    So, there will be no identification of relationship with other table measures.
    Obviously, you need to create 2 Weekend objects in Universe (in two classes).
    Case 1: You need not join these two tables in Universe. When you create 2 Queries in WEBI, automatcially Weekend objects are synchronized (if both are of same datatype)
    Case 2: If you join these two tables in Universe, Obviously,
    your SQL may contain Weekend from Table1, measures from Table 2
    or
    your SQL may contain Weekend from Table2, measures from Table 1
    Finally, You need to create 2 objects in Universe. But your query may contain a single Object based on Case 2.
    Regards,
    Vamsee

  • How to use the TableSorter for two tables at the same view?

    Hello,
    I am using the TableSorter object in order to sort Dynpro tables.
    Suppose I have two tables at the same view, is it possible to use it seperatly for both of them?
    I assume that at the wdModifyView method I will need to catch the table that the user clicked on, yet I don't have an idea of how to do it...

    Hi Roy,
    Constructor of TableSorter
    public TableSorter(IWDTable table, IWDAction sortAction, Comparator[] comparators)
    So, you have to create instance of TableSorter class for each table on the view.
    best regards, Maksim Rashchynski.

  • My iPhone 5s has been stolen during a concert. I tried to use the app Find my iPhone but it said that it was offline. Is there any possible other way to locate? please help!

    My iphone has been stolen during a concert. I tried using the app Find my iPhone but it said it was offline. Is there any possible way you could help me? please help!

    No. If it is offline then it is not capable of being located over the web.

  • Trying to use FMLE  and find FMS URL?

    trying to use FMLE  New to streaming. Downloaded file but can't connect to primary server is what it says  went to web but can't find answerte. How do I find correct fms url?

    Danoxley which Adobe software or service is your inquiry in relation too?

  • I am trying to use iCloud to find my stolen iPod, but it says I don't have any devices with my account, help?

    I had my iPod stolen out of my school bag. I was told to use iCloud to find it. But when i got onto iCloud it said something like i don't have any devices set up or something. Any idea of what i can do to find my iPod location?

    On your iPod Touch.
    iCloud- Find My iPhone overview
    Find My iPhone
    What To Do If Your iDevice Is Lost Or Stolen
    iPhone, iPod Touch, and iPad
    If you activated Find My Phone before it was lost or stolen, you can track it only if it is connected to the Internet by Wi-Fi or cellular. What you cannot do is track your device using a serial number or other identifying number. You cannot expect Apple or anyone else to find your device for you. You cannot recover your loss unless you insure your device for such loss. It is not covered by your warranty.
    If your iPhone, iPod, iPod Touch, or iPad is lost or stolen what do you do? There are things you should have done in advance - before you lost it or it was stolen - and some things to do after the fact. Here are some suggestions:
    This link, Re: Help! I misplaced / lost my iPhone 5 today morning in delta Chelsea hotel downtown an I am not able to track it. Please help!, has some good advice regarding your options when your iDevice is lost or stolen.
      1. Reporting a lost or stolen Apple product
      2. Find my lost iPod Touch
      3. AT&T. Sprint, and Verizon can block stolen phones/tablets
      4. What-To-Do-When-Iphone-Is-Stolen
      5. iCloud- Use Lost Mode
      6. What to do if your iOS device is lost or stolen
      7. 6 Ways to Track and Recover Your Lost/Stolen iPhone
      8. Find My iPhone
      9. Report Stolen iPad | Stolen Lost Found Online
    It pays to be proactive by following the advice on using Find My Phone before you lose your device:
      1. Find My iPhone
      2. Setup your iDevice on iCloud
      3. OS X Lion/Mountain Lion- About Find My Mac
      4. How To Set Up Free Find Your iPhone (Even on Unsupported Devices)

  • Join Two tables based on TO_DATE,TRIM,UPPER Functions in RPD

    Hi All,
    I have a requirement where I have to join 2 tables based on the functions TO_DATE,TRIM,UPPER.
    I have Date Of Birth, Person Name . So I have to use these functions and then join in the RPD.
    Is it possible to achieve. I am stuck in this problem.
    Regards,
    Krishna

    Hi Dann,
    Thanks for your reply. I had tried adding these functions but I get the error 'Only columns,designated predicates and operators are allowed". Niether in the Business not in the Physical layer we are allowed
    to enter any functions in the join conditions between the two tables.
    I am not very sure whether this is the normal behaviour or I can avoid this by doing something.
    Thanks,
    Krishna

  • Data from two tables in the same row in XML transformation

    Hi,
        I am using XML transformation for generating excel file which is to besent as email attachment.
        Here  I want to display the data from two internal tables in the same row in the excel. .I am using   <tt:loop ref=".<table name>"> ...  </tt:loop> for looping through the table. Can I loop two table simultaneously ? In that case how will I specify the fields in each table . Some of the fields in two tables are of same name and type.
    Please help...
    Thanks,
    Jissa

    Hello Brian,
    Thank you for your answer. It is approach I will use, I think. However let me ask: Would it be possible to have a Version in this layout, too? I mean to see, which value comes from Version A and which comes from Version B? Something like this:
    Calendar Month Version Sales Amount
    2011.01  B  200
    2011.02  B  300
    2011.03  A  260
    2011.04  A  230
    2011.05  A  200
    A

  • Finding a TABLE based on a COLUMN NAME...

    I need to find all tables that that have a common column name.
    Upon searching the Forum, I found this nice nugget:
    How to find the table in a schema if I only know a particular column name
    The problem is, my USER_TAB_COLUMNS is EMPTY!
    If it had worked, then my statement would be:
    select * from USER_TAB_COLUMNS
    where COLUMN_NAME LIKE '%TEST%'
    and OWNER='ME';
    I get "no rows selected" (though I know they exist)
    if I do:
    select * from USER_TAB_COLUMNS
    I also get "no rows selected"
    Any ideas!
    Thanks!
    KSL.

    The user_xxx data dictionary tables show all of the whatevers that are owned by the logged in user. So, if you are logged in as user1 the user_tab_columns view will only show tables and views owned by user1.
    The all_xxx dictionary views show all of the whatevers that the logged in user has access to. so if you are logged in as user1 and user2 gave you selet privileges on tablea, then you would see tablea in all_tab_columns.
    The dba_xxx views show all objects in the database, but are generally only available to privileged users.
    If you have access to the dba_views, try:
    SELECT owner, object_type
    FROM dba_objects
    WHERE UPPER(object_name) = 'ANL'It is possible that the table and or its columns were created with double quotes so are case sensitve. It may also be a synonym, pointing to one of the tables that you got form your query.
    If you are only using all_tab_columns then it is possible that the user you are logged in as does not have privileges on the table anl so would not see it in the view.
    A long shot, but are you sure you are in the right database?
    John

  • Joining Two Tables based on Conditions.

    Hi All,
    i would like to join two tables emp and dept with conditional join like
    for example: select emp.column1...............
    left outer join DEPT ON if Dept.column1='A" then emp.column1=dept.column1
    else emp.column2=dept.column3
    i know that bu using the UNION we can dothis, but i donot want to USE UNION.
    please let me know if any workaround for this.
    Thanks,
    Kalyan

    SQL> select * from etl
      2  /
         EMPNO ENAME      JOB              MGR        SAL       COMM     DEPTNO AAA                     DEPT_NO
          7566 JONES      MANAGER         7839       2975                    20 2                         20
          7654 MARTIN     SALESMAN        7698       1250       1400         30 3                         10
          7698 BLAKE      MANAGER         7839       2850                    30 3                         10
          7782 CLARK      MANAGER         7839       2450                    10 1                         20
          7788 SCOTT      ANALYST         7566       3000                    20 2                         20
          7839 KING       PRESIDENT                  5000                    10 1                         20
          7844 TURNER     SALESMAN        7698       1500                    30 3                         10
          7876 ADAMS      CLERK           7788       1100                    20 2                         20
          7900 JAMES      CLERK           7698        950                    30 3                         10
          7902 FORD       ANALYST         7566       3000                    20 2                         20
          7934 MILLER5    CLERK           7782       1300                    10 1                         20
          7936 MILLER7    CLERK           7782       1300                    10 1                         20
    12 rows selected.
    SQL> select * from dept;
        DEPTNO DNAME          LOC
            10 ACCOUNTING     NEW YORK
            20 RESEARCH       DALLAS
            30 SALES          CHICAGO
            40 OPERATIONS     BOSTON
    SQL> ed
    Wrote file afiedt.buf
      1  select
      2     e.empno,
      3     e.ename,
      4     e.deptno,
      5     aaa,
      6     e.dept_no,
      7     d.deptno,
      8     d.dname
      9  from
    10     etl e ,
    11     dept d
    12  where
    13     (e.aaa =1 and e.deptno = d.deptno) or
    14*    (e.aaa =2 and e.dept_no =d.deptno)
    SQL> /
         EMPNO ENAME          DEPTNO AAA                     DEPT_NO     DEPTNO DNAME
          7566 JONES              20 2                            20         20 RESEARCH
          7788 SCOTT              20 2                            20         20 RESEARCH
          7876 ADAMS              20 2                            20         20 RESEARCH
          7902 FORD               20 2                            20         20 RESEARCH
          7782 CLARK              10 1                            20         10 ACCOUNTING
          7839 KING               10 1                            20         10 ACCOUNTING
          7934 MILLER5            10 1                            20         10 ACCOUNTING
          7936 MILLER7            10 1                            20         10 ACCOUNTING
    8 rows selected.Regards
    Singh

  • Hide multiple rows in a dynamic table based on the row value.

    Hi,
    I need to hide multiple rows in a dynamic table based on the specific value of that row.
    I cant find the right expression to do that.
    please help

    Go to the Row Properties, and in the Visibility tab, you have "Show or hide based on an expression". You can use this to write an expression that resolves to true if the row should be hidden, false otherwise.
    Additionally, in the Matrix properties you should take a look at the filters section, perhaps you can achieve what you wish to achieve through there by removing the unnecessary rows instead of just hiding them.
    It's only so much I can help you with the limited information. If you require further help, please provide us with more information such as what data are you displaying, what's the criteria to hiding rows, etc...
    Regards
    Andrew Borg Cardona

  • How to variable exit read table based on selected row on weblayout ??

    Hi All,
    Greeting,
    I have a question regarding IP.
    I have report where I can choose the line. I've already been able to catch the selected row there using ABAP Planning Function.
    The requirement is to change some value from other customized table ( not info cube ) based on selected row.
    So when user's selecting data and pressing a button, the idea is to prompt a variable where they can see the old value, and they can entry the new value. But to query that value, I need to select based on the values the row.
    My Question is how user-exit in variable can read selected row in web planning layout especially it happens when I_step = 1 ?
    Or the other idea is to get the value on that customized table and put it in text web item as the old value. How can I fetch data from table and put it in text web item ?
    Thanks a lot and have a good day,

    Hi.
    My Question is how user-exit in variable can read selected row in web planning layout especially it happens when I_step = 1 ?
    I think there is no way to do it. I_STEP=1 called before the report shows the data.
    But may be the next approach could help you:
    1. when you select line you can use command for populating variables according to selected line. let's say yohave selected line with costcenterr XXX so you can populate variable (let's say Z_CC) with selected value.
    2. create FOX that reads variable Z_CC value and calls any function module with customized table and variable value (you can use CALL FUNCTION statement within FOX and pass to it variable value).
    This is just an idea of some direction - may be you can take it and develope to required result.
    Regards.

Maybe you are looking for

  • Hp officejet pro 8900

    Trying to improve my print quality.  In order to change the black/yellow printhead I need to get the print heads to return all the way to the left of the machine.  I have tried pushing the star (*) and turning the machine on and off, but can't get ac

  • Apple TV w/Vista

    I have a Dell w/Windows Vista, Newest version of iTunes,Sony WEGA w/HDMI, Linksys N Router on a wireless network and my ATV is not connecting at all! ( Can anyone suggest anything, or am I NOT the only person)!? VERY new to ALL of this

  • Troubles transfering music to my N70 Music Edition

    Everytime i want to tranfer music i get an error report on Windows Vista Home premium which says NokiaMusicManager has stopped working. Do i need different software for vista? If i uninstall Nokia Pc Suit and reinstall it it would transfer about 4 so

  • FPY1 Payment medium

    Hi gurus.. I created 3 function modules.  These are called thru the payment medium that I configured to be used in FPY1.  How can I debug FPY1 so that it will stop in the 3 function modules that I created?  I tried to put breakpoint or use DBUG but i

  • Originally purchased the downloadable version of adobe PS elements 12. My computer crashed and they sent me the cd version for a macbook. I cannot find the serial number in the packaging.

    Hello, I purchased PS elements 12 for a windows pc. This pc died and I had to buy a new computer, I got a Macbook air, and since I had just downloaded PS elements 12 adobe was nice enough to send me the cd version for a mac in the mail. I did not hav