Compare the table structures in different schemas. help please
Hi allI have a question...
I have pictures on different schemas something like
Diagram A
-------------
Table 1
Table 2
Table 3
Diagram B
------------
Table 1
Table 2
Table 3
Now situation is table 1 and table 2 will have a similar structure or table 1 in Figure B will have additional columns.
like so... on... for all other tables...
example!
Schema A:
Desc Table 1;
Name Type Null
------------- ------- -------
No Number Notnull
Name Varchar2(10) Not null
Fee Number (10,2) Not null
Scheam B;
Desc Table1;
Name Type Null
------------- ------- -------
DX_No Number Notnull
DX_Name Varchar2(10) Not null
DX_Fee Number (10,2) Not null
comments Varchar(2)
Now I need to write some sort of procedure for the thing to compare these tables which are in different in the column names in the schema and get it had exported to an Excel sheet.and here it's first three columns SHOULD BE CONSIDERED AS SAME even if the DX_ prefix are from the REST OF the PART OF THE COLUMN NAME IS SAME.
and the same way commit coloumn new schema B only... So it should be noted that excel sheets...
I don't know how the ADO or SQL Developer handle this... Is there any plsql block that I can write to do it...
Thanks in advance...
Comparison of columns on all the tables in the two schema
select tc1.owner,tc1.TABLE_NAME,tc1.COLUMN_NAME,
tc2.owner,tc2.TABLE_NAME,tc2.COLUMN_NAME
from
all_tab_columns tc1
full outer
join all_tab_columns tc2 on &user1=tc2.owner
and tc1.TABLE_NAME=tc2.TABLE_NAME
and tc1.COLUMN_NAME like '%'||tc2.COLUMN_NAME
where
tc1.owner=&user2
and tc1.TABLE_NAME in (
select t1.table_name
from all_tables t1
join all_tables t2 on t2.owner=&user2 and t1.table_name=t2.table_name
where t1.owner=&user1)
Published by: xtender on 06.11.2010 12:43
Tags: Database
Similar Questions
-
How to collect statistics on the table for tables in a different schema
Hi all
I have a table in a schema, and I want to collect statistics for the table in a different schema.
I gave GRANT ALL ON SCHEMA1. T1 TO SCHEMA2;
And when I tried to run the command to collect statistics to help
DBMS_STATS. GATHER_TABLE_STATS (OWNNAME = > 'SCHMEA1', TABNAME = > 'T1');
The function will fail.
Is there a way we can collect statistics of the table for tables in a schema into another schema.
Thank you
MK.You must grant analyze to schema2.
SY.
-
How can I import tables from a different schema in the relational model... to add these tables in the existing relational/logic model? PLSS help
Notes; I already have a schema ready relational/logic model... and I need to add more tables to this relational/logic model
can I import the same way like I did before?
But even if I do the same how can I add it in the template? as the logic model has been designed...
Help, please...
Thank you
To view the diagram of logic model in Bachman notation, you right-click on a blank area of the diagram and select the rating > Bachman Notation.
David
-
Join of two tables in two different schemas
Hi all
I have an obligation to join two tables on two different schemas. How to join these two tables in the object view.
Thanks in advance.
Concerning
Kaushik GuillauminYou can do just that using schema name in the +' view object.table name ' + according to the query object and also grant select the another schema to this schema user
ex
you need schem is test and another Act you need to a view object based on the test to join a table on shcema Actyou write semply object sql view code:
Act.table name
and you can also give him select statement on Bill schem table to test
concerning
-
Move the tables to a different tablespace
Hello
I created 6 tables with my account in the USERS tablespace. If users wish to access (and he has privileges), it can be accessed as - username.nameoftb.
Now, I would like to create new tablespace, move there all the USERS tablespace tables and if someone (who has permissions) to have access, it can, but only with the table name. Without using the username who created them.
Could you please help me, how to proceed?
-move the tables to a different tablespace
-users can access without using the name of the creator
Thank you!1. change the SMSC table. ERSUSERWISESUMMARY move tablespace ERST_01 nologging;
Can also rebuild the indexes as well.
ALTER Index SMSC. INDX_ERSDATA_STRTTIME reconstruction tablespace ERSX_01 nologging;
2 create a synonym for this object
create public synonym mrbt_activation for owner_name.object_name;
Concerning
Asif Kabir -
I have the table of 3 columns A, B, C. I want to store the sum of columns A B in the C column without using the DML statements. Can anyone help please how to do. ?
11.1 and especially you have virtual column
SQL> create table t 2 ( 3 a number 4 , b number 5 , c generated always as (a+b) virtual 6 ); Table created. SQL> insert into t (a, b) values (1, 2); 1 row created. SQL> select * from t; A B C ---------- ---------- ---------- 1 2 3
Before that, a front insert - trigger
SQL> create table t 2 ( 3 a number 4 , b number 5 , c number 6 ); Table created. SQL> create or replace trigger t_default before insert on t for each row 2 begin 3 :new.c := :new.a+:new.b; 4 end; 5 / Trigger created. SQL> insert into t (a, b) values (1, 2); 1 row created. SQL> select * from t; A B C ---------- ---------- ---------- 1 2 3
-
How to copy the table structure in oracle without constraints?
Some constraints are copied in whole;
create table w (order_type varchar2(1)); insert into w values ('N'); insert into w values ('C'); insert into w values ('D'); insert into w values ('X'); alter table w add constraint pk_w primary key (order_type); create table t (x number, order_type varchar2(1) constraint t_fk references w (order_type) ); insert into t values (1, 'X'); commit; create table t2 as (select * from t where rownum < 1); 1 select table_name, constraint_name from all_constraints 2* where table_name in ('T', 'T2') SQL> SQL> / TABLE_NAME CONSTRAINT_NAME ------------------------------ ------------------------------ T T_FK
-
Hai everybody
is it possible to import just the structure of the Table from a backup oracle dump file. After you import the table structure to new possibility to import the data in the tables of the same/other backup dump file.
What I wanted to say - I will first import the structure of the table from the dump file. After you import the structure of the table, I want to check the constraints. Finally, I want to import the data from the same dump file.
Thank you
ChristianeHello
Discover this .
Arun-
-
I play runescape and lately to get java error on my desktop icons very much, they are labeled hs_err_pid followed 3 different numbers, help please
Hi madsman,
Thank you for using Microsoft Windows forum
For better support please give us the exact error code.
This could well be a virus problem. If your step would be to run a full scan of PC online using the following link:
http://OneCare.live.com/site/en-us/Center/whatsnew.htm
Then, go to your Control Panel and open "Programs and features" and tell us what version of the Java Application you have.If you have a Version that is older, then you must remove the older version of "Programs and features" and install the latest version by visiting here: http://www.java.com/en/download/manual.jsp
It is normally acceptable to load new versions of Java on top of older versions, but in this case we want to start over with a latest full version.
Scroll down a bit to the "Download Windows Section" and download/install "Windows 7".
After download/install this newer version. Close all windows and applications that may be running and "restart" your computer.
Then click the link once more to return to the download page and select the link that reads "Check Java has been installed properly" If the application downloaded/installed correctly then this test will let know you that Java is working properly.
Your last step would be to run a malware scan using this link:
Malicious software removal tool: http://www.microsoft.com/security/malwareremove/default.aspx
Kind regards
Aziz Nadeem - Microsoft Support -
I had xp on my computer, I bought a WIN 7 take ownership with a product key sealed in the box. make a backup with windows easy transfer to external hard drive. When I enter the product key I get the message: the product key is valid. Help, please
Skip entering your product key Windows 7 and complete the installation.
When you reach the desktop, click Start, right-click on computer
Click on properties
Scroll down to the Windows Activation
Click the link x days before activation.
Click on the link that says: "show me other ways to activate.
Enter the product key
Click next
Select the Activation of the phone
Click Next when you enter your key page
Select your country
Click Next, call the number listed
Be sure to explain your situation to the Appeals Officer.
Provide the installation generated when ID requested by the call agent
They give a confirmation ID in return, enter it
Click next to complete the activation.
However, the requirements for the media upgrade is that you have an operating system already eligible such as Windows XP or Vista installed to use it. Since the Windows 7 end user license agreement.
15 UPDATES. To use upgrade software, you must first be licensed for the software that is eligible for the upgrade. After the upgrade, this agreement takes the place of the agreement for the software that you upgraded. After upgrade, you can no longer use the software that you upgraded.
So, if you are always denied, you will just have to reinstall Windows XP or Vista and let it do the verification of eligibility.
or
How to activate Windows 7 manually (activate by phone)
1) click Start and in the search for box type: slui.exe 4
(2) press the ENTER"" key.
(3) select your "country" in the list.
(4) choose the option "activate phone".
(5) stay on the phone (do not select/press all options) and wait for a person to help you with the activation.
(6) explain your problem clearly to the support person.
http://support.Microsoft.com/kb/950929/en-us
---------------------- -
Instill items 11 (mac) with OSX El Capitan worm. 10.11.4 puts icon on the screen, but then nothing, any help please.
I thought I would try the version test, but with the same problem, will not work.
Any help please would be appreciated
Concerning
MP
How to open third-party applications to developers not identified in Mac OS X "Mac tips.
-
If I have a mask in Photoshop feather, save my work and then view in Lightroom, the mask is not good! Help, please?
This is a known bug - see workaround in this bug report in the Adobe official feedback forum: Photoshop: blur Non-destructive for the masking does not record properly more | Community customer Photoshop family. In addition, please add your vote and opinion for the bug report. even though Adobe has acknowledged the problem, they can't fix it immediately. Each vote makes it somewhat more likely that they will prioritise a fix.
-
After importing the files in lightroom cc2015.2, they are all less exposed and developing the show exposure to-5. Help, please.
Hi paulw,
For existing images whose exposure have changed, please select all and go to photo > develop settings > reset.
For import next session, please follow the steps below:
- Turn off apply tone auto under Lightroom preferences settings
- Restart Lightroom and then import images again.
Concerning
Sarika
-
I posted a question can not find the question and or response. Help, please
I posted a question can not find the question and or response. Help, please
AFAIK, you can't share a catalog like this.
The only recommended method is to store your images and catalogue on an external drive, you can alternatively plug in both computers.
With today the external USB drives, the speed is still correct, and many users are satisfied with this solution.
-
Compare the table and out of the common elements
Hello
Can you help me to compare the two tables in the attached file in VI and out the elements common to the two tables?
Thank you
hiNi
There is no wire table through the False State in the structure of your business. Use the default value if unwired is selected for this tunnel. the default value for this tunnel is an array of empty strings. Run the wire straight through, and Bob's your father's brother.
Maybe you are looking for
-
Why the empty folder reappears on the desktop in XP when I use the Save as command
I'm under XP_SP3 with Firefox 8.0.1. I had an empty folder on my desktop called "D E M O" I used to use for downloads. I moved to another HD on my system and removed from the desktop computer.Now, any moment I DL EVERYTHING type of file with Firefox,
-
How can I put the old navigation bar in Firefox 4.0?
I installed FF4 when the final version has been released, and, like many other users, I find the new UI very frustrating. I managed to deal with tabs, the menu and the status bar. But I can't deal with the navigation bar. Not only I want to rearrange
-
6 s and Mazda Bluetooth problems iPhone
Hi all, I have an iPhone 6s on 9.2.1 and a 2016 Mazda CX5 Grand Touring with a Bose stereo system. I'm having a problem when playing audio via Bluetooth (music to iTunes, podcasts, etc.) is of poor sound quality, the sound skips to come at random, an
-
Re: NB200 - making noise and the screen turns white
Hello My laptop makes the high pitched noise and the screen turns white. Please help with this question. Thank you
-
Hello I see the block addition is beautifully overloaded to overlay waveforms and I would like to know how it works. Specifically, I want to know if using matrix addition (i.e. simply by adding the elements of each waveform) OR is he among the wavefo