Find the relationship between tables where the constraint type is 'R'
Hello,
I am trying to find an answer of the following question:
How to query the user_constraints view (probably some more views should be involved here) in order to get information about the table name, the column (or columns) that is (are) a foreign key to another table, the name of the referenced table, and the name of the referenced column (or columns) and finally the name of the FK. And additionally, if the referenced table from the first row has its own constraints of type 'R', then to have this table in the second row, where this same table stands in the first column. Each table that is a participant in this tree, of course, could have one or many FK to other tables. One does not know this at run time.
A predicate to say with which table to start the search from will look like this:
<pre>
user_constraints.table_name = 'my_table_name'
</pre>
So, if you could help by providing at least hints for such a query, I will be glad to see different answers.
Thanks :)
Thanks a lot for the answer!
That will work and is a very useful starting point.
Similar Messages
-
Query to find all relationships between tables
Please help me wit the following
Query to find all relationships between tables
SAMPLE OUTPUT:
PRIMTAB PRIMCOL FOREIGNTAB FOREIGN KEY
DEPT DEPTNO EMP DEPTNO
Return all records in the database.
PLEASE HELPSET LINESIZE 150
COLUMN primcol FORMAT A30
COLUMN foreigncol FORMAT A30
SELECT uc1.table_name AS primtab,
ucc1.column_name AS primcol,
uc2.table_name AS foreigntab,
ucc2.column_name AS foreigncol
FROM user_constraints uc1,
user_constraints uc2,
user_cons_columns ucc1,
user_cons_columns ucc2
WHERE uc1.constraint_name = uc2.r_constraint_name
AND uc1.constraint_name = ucc1.constraint_name
AND uc2.constraint_name = ucc2.constraint_name
AND ucc1.position = ucc2.position
ORDER BY uc1.table_name,
ucc1.position
/ -
How to find the relationship between tables
Hi All
I am working in oracle apps R12 in OM and INV and i am new. Is there any document for getting the all key tables and the relationship of the tables.
Thanks & Regards
Srikkanth.MHi;
You need to check e-trm site to can see table explaniation,integrity,relations etc
Check:
etrm.oracle.com
Regard
Helios -
Inserting value in the single column table where the only column is a identity column
Hi,
Following is my table definition:
create table test1 (col1 int primary key identity(1,1))
Now here, the only column col1 in the table is an identity column. Now I want to add explicit values to this column
without SET Identity_Insert test1 On.
How?You have a fundamental misconception. IDENTITY is not a column; it is a table property and it is totally non-relational. This is a left-over from UNIX file systems, which were built on magnetic tape files. It is a sequential data
model which counts the insertion attempts to get a physical record number. By definition IDENTITY cannot be a valid key; it is not a valid data type (all data types in SQL are NULL-able); keys are a subset of columns in a table.
Have you ever read a single book on RDBMS? You can start with MANGA GUIDE TO DATABASE, it is the clearest intro book I know.
--CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
in Sets / Trees and Hierarchies in SQL -
Collecting all the records in the item int table where the same matnr
Hi All,
I have two internal tables with records as below.
HEADER INTERNAL table
material num plant
50410 LV01
50411 AN01
50412 AN01
50413 LV01
ITEM TABLE
Material num stor loc
50410 ER01
50410 ALQW
50410 WFDD
50412 ER01
50413 ER01
50413 XK01
I want to move this to final internal table, here the record 50411 is not there in second int table still i want to move to final table.
in the final int table record should be as follows
material plant stor loc
50410 LV01 ER01
50410 LV01 ALQW
50410 LV01 WFDD
50411 AN01
50412 AN01 ER01
50413 LV01 ER01
50413 LV01 XK01
I'm not getting the full records in the final int table.How to do this.
Thanks & Regards,
SabuHi Sabu,
You can get the data in final internal table as follows :
**First Declare the Final Internal table as :
types : begin of wy_final,
matnr like mara-matnr, " Material Number
werks like mseg-werks, " Plant
lgort like mseg-lgort, " Storage Location
end of wy_final.
data : wt_final type standard table of wy_final with header line.
**Declare a temporary Header Internal Table
wt_header_temp[] = wt_header[].
Then loop at Item table as it has multiple entries for same material Number
loop at wt_item.
**Then read Header Table for mapping material Number & picking the corresponding Plant.
read table wt_header with key matnr = wt_item-matnr.
if sy-subrc eq 0.
wt_final-matnr = wt_item-matnr.
wt_final-werks = wt_header-werks.
wt_final-lgort = wt_item-lgort.
append wt_final.
clear wt_final.
endif.
read table wt_header_temp with key matnr = wt_item-matnr.
if sy-subrc eq 0.
delete wt_header_temp.
endif.
endloop.
loop at wt_header_temp.
read table wt_final with key matnr = wt_header_temp-matnr.
if sy-subrc ne 0.
wt_final-matnr = wt_header_temp-matnr.
wt_final-werks = wt_header_temp-werks.
append wt_final.
clear wt_final.
endif.
endloop.
sort wt_final by matnr.
I Think this would probably solve your purpose.
Thanks & Regards,
Bhavika
Edited by: bhavika kumar on Mar 19, 2009 5:46 AM -
What is the relationship between iCloud and the App Store?
My wife has an ipad and has purchased some apps from the App Store. I have a new iphone5c and managed to load one of her purchased apps onto my phone by using her App Store ID and password. When I did this, a cloud symbol appeared and I assume I was not charged for the download. I have some questions about how all this works.
I have not, to my knowledge, set up any icloud account for my new iphone. Did aforementioned app download from her icloud?
Does this mean that I should not set up an icloud account of my own on my new phone? What about backing up my contacts? I would like to continue sharing purchased apps.
Can you use the same icloud account on more than one device? If so, would they have to have identical contacts and apps?
My wife also has a new phone; should she set up another icloud account?
Is my Apple ID related to either the icloud or App Store?
If anyone can help me sort this out it would be greatly appreciated.ICloud and the App/iTunes Store are different services from Apple, you can use either by logging in with an Apple ID, you don't need to use the same ID for all services on the same device.
You can both share an ID for the iTunes and App stores so you can share purchased content but each use different ID's for iCloud, so you have your own contacts, calendars etc. you can use the same ID on more than one device. -
The Relation between tables and views in oracle financial
Dears
I am work in oracle e business r12
and i need to build report as xml
when run my select its need big time to view data i have a huge of data so i need to clear the relation of this tables if there is miss and if there another technique in select statement
this is my select statement
select
j_hdr.je_header_id je_header_id,
hdr.VENDOR_NAME supplier,
SEGMENT1||'-'||SEGMENT2||'-'||SEGMENT3||'-'||SEGMENT4||'-'||SEGMENT5||'-'||SEGMENT6||'-'||SEGMENT7||'-'||SEGMENT8||'-'||SEGMENT9 Account_number,
hdr.gl_date gl_date,
j_hdr.CURRENCY_CODE CURRENCY_CODE,
inv_lin.DESCRIPTION DESCRIPTION,
j_lin.ENTERED_DR ENTERED_DR,
j_lin.ENTERED_CR ENTERED_CR,
j_lin.ACCOUNTED_DR ACCOUNTED_DR,
j_lin.ACCOUNTED_CR ACCOUNTED_CR,
j_hdr.JE_SOURCE JE_SOURCE,
j_hdr.DEFAULT_EFFECTIVE_DATE Transaction_DATE,
hdr.INVOICE_NUM INVOICE_NUM,
QUICK_PO_NUMBER PO_NUMBER,
null ASSET_CATEGORY_ID,
hdr.VENDOR_ID VENDOR_ID
from gl_je_headers j_hdr,gl_je_lines_v j_lin,ap_invoice_distributions dist,ap_invoices_v hdr,ap_invoice_lines_v inv_lin
where code_combination_id = DIST_CODE_COMBINATION_ID
and hdr.invoice_id = inv_lin.INVOICE_ID
and dist.invoice_id = inv_lin.INVOICE_ID
and j_hdr.JE_HEADER_ID = j_lin.JE_HEADER_ID
and j_hdr.status = 'P'
and nvl(:P_SOURCE,'Payables') = 'Payables'
and je_source = 'Payables'
and j_lin.CODE_COMBINATION_ID between ( select CODE_COMBINATION_ID
from gl_code_combinations_kfv
where CONCATENATED_SEGMENTS = :P_FROM_COMBINATION_CODE)
and ( select CODE_COMBINATION_ID
from gl_code_combinations_kfv
where CONCATENATED_SEGMENTS = :P_TO_COMBINATION_CODE)
AND TRUNC(dEFAULT_EFFECTIVE_DATE) BETWEEN NVL(:P_FROM_DATE, DEFAULT_EFFECTIVE_DATE) AND NVL(:P_to_DATE, DEFAULT_EFFECTIVE_DATE)
Thanks in advanceWelcome to the world of complicated Oracle Application queries. Didn't fully understand your question, so a few guesses -
I think that you are asking how to make your query faster? I would reference the FAQ section on how to post a question regarding performance.
Your title indicates you want to understand the relationship between tables and views. In general, Oracle Applications uses views for 2 reasons - to join data from multiple tables for display, and to differentiate data from different organizations. (I am still on 11i and have heard organizations are handled differently in 12 so I can't speak to that for sure).
To understand the relationship between tables in a view, you can access the view's source code, either through a development tool such as PL/SQL Developer or TOAD (I'm guessing Oracle's tool does this also, but have never used it), or by querying the source from the dba_source table.
select * from dba_source where name = (name of view) and type = 'VIEW' order by line;without the ( ) just the view name, in all capital letters i.e. , 'GL_JE_LINES_V'
Good luck! -
In which table we can find the relationship between Role id and Task id
Hi Experts,
In which table we can find the relationship between Role id and Task id in Cprojects.
Thanks
SubhaskarHi Subhaskar,
Apart from DPR_ENTITY_LINK , you can also get it from table DPR_PART.
Please go through the below link
http://wiki.sdn.sap.com/wiki/display/PLM/cProjectstablesin+SAP
I hope this will help you.
Regards,
Rahul -
The best way to find the relationship in table especially for PS
Hi All,
How the fastest way to find the relationship between PS table with another table.
For example table PROJ, PRPS with another table in FICO module...let say the table that store the transaction CJR2...WBS element link to Cost element or activity type...and material on it...
please help.
Cheers,
Niesgo to se38 select any report then click radio button attribute and double on logical data base write PSJ as logical data base for Project and select display structure. You will get all dependant table name in relevant sequence
-
How to find the relation between tables
Hi
I am working in Oracle R12
How to find the relationship between these tables INV_MIN_MAX_TEMP,po_requisition_lines_all and Per_all_people_f
These two table i have joined with po_requisition_lines_all and Per_all_people_f To_person_id from PO and Person from hr table but i cant able to join this table with other tables INV_MIN_MAX_TEMP
regards
SrikkanthHi;
Please check e-trm site for table relation,integration,explanation etc..
etrm.oracle.com/
Regard
Helios -
Determining the relationship between 2 database tables
hi all,
is it possible to write a java program that can determine the relationship between 2 database tables, given only the database tables? can you provide examples please? thanks.java.sql.DatabaseMetaData provides the methods ....Just as long as the relationships are simple and the database and driver are known. For example there is no way that it is going to be able to tell you about a trigger that connects two tables.
-
How to easily find all the relationship between group and reports in OBIEE
Hi, All:
I am working with a production env which contains many group and reports.
I want to know if there is a quick way to export the relationship between all the group/users and all the reports/page/etc.
Thank you for the kind help.Thanks so much !
May be you can suggest a way around what I trying to achieve. I migrated(imported) one BA from our Prod system to an R12 VIS demo system into the pre-existing APPS EUL as owner SYSADMIN. When I login as SYSADMIN I see all the workbooks(the ones that were migrated from PROD and the ones shipped with VIS). I am interested only in the Workbooks that I migrated from Prod System. There are 100's of migrated workbooks. I was thinking of creating another APPS user and grant this newly created user ADMIN privileges on the migrated BA and transfer ownership of all migrated WORKBOOK. This way when I login as the newly created user I will only see the migrated Workbooks. How do I automate the process to seperate them using SQL or otherwise
Thanks
Bismi -
What the relationship between eul4_documents and eul4_objs
we use discoverer administration to creat folder. then we create workbook in discoverer desktop from available folders . now i want to write a sql to show the the relationship between folder and workbook. as i know , i can find folder in table eul4_objs and workbook in table eul4_documents . but how to link them together?
For example , i know folder A. how can i find the workbooks which created from folder A only by using SQLHi,
Instead of EUL5 use EUL4 in this query.
select distinct doc_name, obj.obj_name folder_name, bas.ba_name
from eul_us.eul5_documents doc
, eul_us.eul5_elem_xrefs xref
, eul_us.eul5_expressions exp
, eul_us.eul5_objs obj
, eul_us.eul5_ba_obj_links bol
, eul_us.eul5_bas bas
where xref.ex_from_id = doc.doc_id
and doc.doc_name = &your_report
and xref.ex_to_id = exp.exp_id
and obj.obj_id = exp.it_obj_id
and bol.bol_obj_id = obj.obj_id
and bas.ba_id = bol.bol_ba_id
Hope it helps you.
Best Wishes,
Kranthi. -
What is the relationship between the SAP BC and XI?
Hi Friends,
What is the relationship between the SAP BC and XI?
Regards
SamHi Samuel Melvin ,
The SAP BC is basically WebMethod's product supplied free of charge to SAP customers.
SAP XI is a purchased product from SAP that can be used to integrate multiple systems, you would need to contact your SAP Account rep to discuss licensing issues. You cannot download it for free from sapnet.
It is probably more relevant to discuss the comparison between these solutions based on a specific scenario, but here are some basic differences. Obviously, the foremost one being that the SAP Exchange Infrastructure (XI) belongs to the SAP Netweaver technology suite, whereas Business Connector although bundled by SAP is really a Integration tool provided by Web Methods.
Being a Netweaver solution the SAP XI is central in design and configuration. The SAP XI is really integrated as a required solution for some of new mySAP solutions like SRM. For example, the mySAP SRM business scenario for Supplier Self Services in EBP requires the implementation of SAP XI, the Business connector cannot be utilized to replace this scenario. Although the SAP Business Connector can still be utilized with SRM for all XML based communication. Both mySAP SRM and XI runs natively on the SAP WebAS Server.
The Business Connector is a point to point solution that provides messaging and routing. Currently a number of organizations using the Business Connector utilize it to communicate between its partners using XML based messaging. This can be achieved using SAP XI as well, but SAP's strategy is to utilize XI as a central hub for messaging, routing, and communication between all SAP, non-SAP systems as well as partners. As SAP XI is a relatively new solution, organizations that are looking for communicating with their partners to exchange XML based documents or other point-to-point scenarios can still utilize SAP Business connector.
Initially, when SAP announced the SAP XI, there was a notion that SAP Business Connector would be phased out and SAP XI would be the solution utilized hereon. But SAP will continue to support the Business Connector, the SAP Exchange Infrastructure will remain as the SAP's strategic integration solution. All new and or updated SAP solutions will make use of the XI for all process-centric, message based integration. As upgrades are scheduled and new solutions deployed we'll see the mandated need for XI but currently the only solution that natively requires SAP XI is mySAP SRM 2.0.
It will be interesting to see how organizations that already utilize SAP Business Connector warm up the SAP XI idea. But for the most part they will not have a choice really, as the new mySAP products are going to natively require the use of SAP XI for all process-centric integration between the different SAP solutions. But there is no reason why organizations cannot continue to utilize the SAP Business Connector for all point-to-point solutions already deployed with possibly document exchange and partner integration. Hope this helps.
These web-sites may help u in understanding XI & BC
Understanding SAP XI SEEBURGER
http://www.seeburger.com/fileadmin/com/pdf/SAP_Exchange_Infrastructure_Integratio_Strategy.pdf
http://www.t2b.ch/Flyers/t2b%20SAP%20Xi%20Flyer.pdf
SAP Exchange Infrastructure (BC-XI)
http://help.sap.com/saphelp_srm30/helpdata/en/0f/80243b4a66ae0ce10000000a11402f/content.htm
webMethods for SAP
http://www1.webmethods.com/PDF/webMethods_for_SAP-wp.pdf
http://help.sap.com/saphelp_srm30/helpdata/en/72/0fe1385bed2815e10000000a114084/content.htm
cheers!
gyanaraj
****Reward points if u find this helpful -
What's the relationship between Agent and JMX-instrumented applications?
Hi, I'm a beginner of EM and JMX. I'm trying to integrate my application with EM. After reading some documents, I find I need to make my application JMX-instrumented first and then design the plug-in. But I'm still a little confused about the relationship between the Agent and the JMX-instrumented appliactions.
Here is what I'm confused:
1. Should the EM Agent be installed in the host where my JMX-instrumented application is installed? If this is true, then that will mean Agent cannot monitor the remote resource. But it sounds not reasonable.
2. When making the application JMX-instrumented, we should use the platform MBeanServer or create our own MBeanServer? Do they have a major difference? and will it impact the plug-in design?
Thanks in advance.Answers to your queries:
1. Should the EM Agent be installed in the host where my JMX-instrumented application is installed? If this is true, then that will mean Agent cannot monitor the remote resource. But it sounds not reasonable.
Its not necessary that EM Agent should be installed on the same host where JMX-instrumented application is/are installed. EM Agent has a fetchlet (named OJMX) that can be used. Refer to [Management Using Web Services and JMX|http://download.oracle.com/docs/cd/B19306_01/em.102/b16246/web_jmx.htm] for more details on emjmxcli tool, which can help to build the plug-in which can monitor the MBeans. [EM Extensibility Guide|http://download.oracle.com/docs/cd/B19306_01/em.102/b16246/toc.htm] contains all the details for building a plug-in.
2. When making the application JMX-instrumented, we should use the platform MBeanServer or create our own MBeanServer? Do they have a major difference? and will it impact the plug-in design?
To best of my knowledge, plug-in design doesn't get impacted
Maybe you are looking for
-
My Mac wont start up since downloading iTunes 11
Please help me unfreeze my MacBook Pro which is beeping, shutting down and freezing since I tried to download iTunes 11". If I turn it off it restarts itself randomly, beeping at me, but doesn't,t get through the start up screen.
-
Hi, I've developed custom application in Office365(Sharepoint Online) using CSOM/Javascript. Security team from client side has been reported one major issue to the our application that any end user can comment our CSOM/Javascript code and bypass the
-
I've attached a Gigaware microphone to my Mac Mini, it doesn't seen to recognize the microphone, is this a compatibility issue ?
-
WebVPN on 881 Router and Groups
Hi there, i have an question and i hope anyone can help me. Is it possible on an Cisco Router to build WebVPN groups ? I want build one group for users with grand access rights. --> Connect with anyconnect or Web Portal and have access to all Se
-
Spa112 voice module is not ready
What can cause the "voice module is not ready" message in the spa112? I keep getting that on multiple spa112's while provisioning them. We are provisioning via TFTP and upgrading the firmware to 1.2.1 as part of the config. I have 2 files being do