Access to the content of the tables of a schema into another schema
HelloI have my doubts... Suppose I have a user called DEMO and it has tables. now I have another user called DEMO1
my doubt is. How can I get the DEMO user tables in DEMO1. If updating the table DEMO1 which should reflect
DEMO user. Help me...
Dear friend,
You can consult the tables of a schema in another schema using the following steps.
(1) you must grant privileges on table demo Demo1, here's the statement to do so.
Grant Select, update on the table table_name to Demo1
(2) Create in Demo1 for the table_name demo, the suite is about education to do.
SYNONYM to CREATE or REPLACE table_name for Demo.table_name;
(3) do the Update statement on the table table_name in Demo1. Updated these results reflected in demo when you post the update statement in Demo1.
Hope that gives you an idea.
Kind regards
Ravi Kumar Ankarapu.
Tags: Database
Similar Questions
-
Oracle 11G - access to the table problem
Hello
New on Oracle IAM... After you create a database, I created a connection and SYSDBA role...
And then I create a table called Table1. And then I create a new USER and I Connect with the same SID of the database, but the role has the DEFAULT value for this new USER...
01. but the problem is that I can't find the Table1 table for this new user... so how acess as Table1...?
02. I came to know in Oracle, also we can design forms for the frontend and can generate EXE... Is this true?
03. in SQL Server - Sql Port with static IP - we have access to the database for remote users... Is it possible for Oracle?
Thanks for the directions...997497 wrote:
Hello
New on Oracle IAM... After you create a database, I created a connection and SYSDBA role...What the user did you use to connect? I'm guessing that you logged in as SYS
And then I create a table called Table1. And then I create a new USER and I Connect with the same SID of the database, but the role has the DEFAULT value for this new USER...
So I guess that you have created the table in the SYS schema. You should never, ever create user objects in the SYS schema. If you have created the table in the SYS schema, you really need to drop and create in a more appropriate scheme.
You indicate that you come from SQL Server, so there may be a question of terminology. Which refers to SQL Server as a "database" is roughly equivalent to what Oracle designates as a "scheme." An Oracle database contains many schemas. A schema is the set of objects owned by a particular user.
01. but the problem is that I can't find the Table1 table for this new user... so how acess as Table1...?
As I said above, you really, really should not create objects in the SYS schema. If you really want, however, you need to log the SYS schema and grant access on the table to your new user
GRANT SELECT ON sys.table1 TO your_new_user
You will then need to fully qualify the table name in your SELECT (or create a synonym or the current_schema)
SELECT * FROM sys.table1
02. I came to know in Oracle, also we can design forms for the frontend and can generate EXE... Is this true?
Older versions of Oracle Forms would create server executables. The modern versions are used to create three-tier applications. You can also use APEX to build web applications. Of course, you can also generate executables by writing code in another language (often .net).
03. in SQL Server - Sql Port with static IP - we have access to the database for remote users... Is it possible for Oracle?
Is this possible? Sure. Depending on what means "remote users", however, it may be poorly advised - you would never open a database to the internet directly, for example, you want to ensure that the remote users are connected to your network (via a virtual private network).
Justin
-
Hello
How can I use statistics for all the tables in a schema in SQL Developer? and how long will it take on average?
Thank you
Jay.
Select the connection and right-click on it and select schema statistics collection
-
Access to the table of dynamic addresses via SNMP
Hello
I am trying to access the table of dynamic addresses via SNMP, with a PowerConnect 6248 switch. I tried to follow the instructions [1], as other parts of the BRIDGE-MIB are ok on this switch.
When snmpwalk'ing BRIDGE - MIB:dot1dTpFdbEntry, I have nothing, while, on the switch web interface there are entries in the table.
Any idea?
[1] http://www.cisco.com/en/US/tech/tk648/tk362/technologies_tech_note09186a00801c9199.shtml
-
Access to the table in paragraph index loop (ID CC 2014)
Initially, I wanted to look for every blank line in the page (those who only have a return '\r') and remove the carriage return character in order to remove the blank line.
Here's what I have so far:
var myParagraphs = app.activeDocument.textFrames [0].paragraphs.everyItem ();
for (i = 0; i < myParagraphs.length; i ++) {}
myChar = myParagraphs [i] .characters var [0];
If (myChar.contents == '\r') {}
App.Select (myChar);
App.Cut ();
}
}
This out errors (it does not what I expected it to do).
By running in the ESTK gives the error 'the object does not support the property or method '0' ' at line 3.
If I have a particular character as reference:
var myCharacter = app.activeDocument.textFrames [0] .paragraphs [0] .characters [0]
If (myCharacter.contents == '\r') {}
App.Select (myChar);
App.Cut ();
}
I get success.
paragraphs.everyItem () generates an array of points and I can confirm that with:
Alert (myParagraphs.Contents);
I'm referencing the table incorrectly?
NO.
The problem is that the real object 'Paragraphs' changes as soon as you take just a single '\r' - the number of changes in paragraphs! Your "myParagraphs" temp table always contains a copy of the document as they were, but as soon as you take a return, it no longer matches what is actually in the document.
I have two different solutions for you, choose one:
1 loop backwards over the table of myParagraphs instead of to the front. If you delete a return, just in front of it is more valid - but everything behind it will be valid.
A loop backwards on a 'live' table is a trick that works with all objects. It will come handy repeatedly.
2. (I think I would prefer this in this situation) without having to "manually" loop over all paragraphs and verification of its characters. Simply use GREP! Search the '(?<=\r)\r+'> =\r)\r+'> ) ( without the quotes, as always) and replace it with nothing. Fact.
Free tip of the day: do not define a selection and use "app.cut ()". You can simplify this to "myParagraphs [i] .characters [0] .remove (); It should be much faster than the selection and then using cut. (And why to use "cut" when you want "app.clear ()"? (After checking: Oops.) Seems that someone at Adobe forgot to include that!)
-
Explain plan - index range scan lines increase while access to the table by the row id
I use Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64 bit Production. Please help me understand why the rows returned from the index range scan is 3 but access the table by row index 10155 id. Please refer to explain the plan ID 7 and 8.
Thanks a lot for all the help...PLAN_TABLE_OUTPUT ---------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost | --------------------------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 8308 | 446K| 4408 | | 1 | SORT ORDER BY | | 8308 | 446K| 4408 | |* 2 | HASH JOIN | | 8308 | 446K| 4316 | |* 3 | HASH JOIN | | 8189 | 255K| 2256 | |* 4 | INDEX FAST FULL SCAN | TUNE_CHD_07 | 8071 | 72639 | 199 | |* 5 | TABLE ACCESS BY INDEX ROWID| CLM_HDR_CLM_LN_STATUS | 10155 | 228K| 2055 | |* 6 | INDEX RANGE SCAN | XIF3CLM_HDR_CLM_LN_STATUS | 3 | | 120 | |* 7 | TABLE ACCESS BY INDEX ROWID | CLM_HDR_CLM_LN_STATUS | 10155 | 228K| 2055 | |* 8 | INDEX RANGE SCAN | XIF3CLM_HDR_CLM_LN_STATUS | 3 | | 120 | --------------------------------------------------------------------------------------------- Predicate Information (identified by operation id): --------------------------------------------------- 2 - access("CHCLS"."CLAIM_HEADER_SID"="CHCLS1"."CLAIM_HEADER_SID") 3 - access("CHD"."CLAIM_HEADER_SID"="CHCLS"."CLAIM_HEADER_SID") 4 - filter("CHD"."CLM_TYPE_CID"=2) 5 - filter("CHCLS"."CLAIM_LINE_SID" IS NULL AND "CHCLS"."TO_DATE" IS NULL) 6 - access("CHCLS"."STATUS_TYPE_CID"=8 AND "CHCLS"."STATUS_CID"=71) 7 - filter("CHCLS1"."CLAIM_LINE_SID" IS NULL AND "CHCLS1"."TO_DATE" IS NULL) 8 - access("CHCLS1"."STATUS_TYPE_CID"=2 AND "CHCLS1"."STATUS_CID"=130) Note: cpu costing is off
-
Hello
I'm trying to achieve the following objectives:
1. in table A, select rows based on the values in column 2. something like SELECT * FROM TABLE A WHERE (COLUMN2 = 'X' or Column2 IS NULL)
2 and these values selected, I want to update Column3 from Table A if TableA.column1 = TableB.column1, but only if there is exactly one game. If there are multiple matches, column 3 of the table article updated.
That's what I've tried so far.
UPDATE TABLE_A
SET
TABLE_A.COLUMN3 = (SELECT COLUMN3 OF TABLE_B
WHERE ((TABLE_B.COLUMN1 = TABLE_A.COLUMN1) AND ( TABLE_B.COLUMN1 IN (SELECT Column1 FROM TABLE_B GROUP BY COLUMN1 , HAVING COUNT (*) = 1)))
WHERE EXISTS (SELECT * FROM TABLE_A)
WHERE ((TABLE_A.COLUMN2 = 'X' OU TABLE_A.COLUMN2 = 'Y') AND (TABLE_A.COLUMN4 IS NULL OR TABLE_A.COLUMN4 = ' ')));
More details on my DB environment:
Version Info:
Oracle Database 11 g Enterprise Edition Release 11.2.0.4.0 - 64 bit Production
PL/SQL Release 11.2.0.4.0 - Production
Toad, but, depending on whether the query updated all lines. I would really appreciate if someone could tell me how to fix my request.
Thanks in advance.
Exists it predicate in the block of update will be set to true if there is at least one row in table_a where column2 is X or Y and column4 is null or a space. You need to correlate exists it with the outer query query (I'm guessing on column1) to get the result I think you want. However, who would update all rows in table_a who meets the criteria, there is a corresponding row in table_b, affecting Column3 lines form null not matched or not. (Again), I'm guessing that's not your intention. If you only want to update the lines in table_a which have a corresponding line in table_b and meet the other predicate, then I think you want something more like:
Update table_a
Set table_a.column3 = (select column3 of table_b
where table_b.column1 = table_a.column1 and
Table_B.Column1 in (select column1 from table_b
Group by column1, having count (*) = 1))
where ((table_a.column2 = 'X' ou))
table_a.Column2 = 'Y') and
(table_a.column4 is null or)
table_a.column4 = ' ')) and
table_a.Column1 in (select column1 from table_b
Group by column1, having count (*) = 1)
John
-
Hi all
How all the tables in a particular schema? If I have a query ALL_TABLES, giving all the tables on the system, but I want tables under a particular scheme (for example the FACTS) only.
understand where owner = schema name
-
I have two tables (2) RESULT TAB (1)
CREATE TABLE TAB
(
NUMBER OF SNO
A NUMBER,
B THE NUMBER.
NUMBER OF THE SUM
);
CREATE AN ARRAY OF RESULT
(
NUMBER OF SNO
NUMBER OF THE SUM
)
my doubt is:
(1) I want to insert a table TAB, my question is how to insert a column to the SUM using the column A AND B... Here im adding two values of the column and store result in the AMOUNT column.
SNO A B SUM
1 100 150 250
2 300 100 400
I want to like this, it is possible with single insert query?
(2) at the time of the insertion TAB of values that SNO, and the values of table TAB $ insert in the table of RESULTS... is it possible these two inserts at the same time?
in fact, im using another this table.fro TAB and easy to understand I write like that, please solve this problem
First, you post in the wrong forum as this one is only for Oracle's SQL developer tool. So you might ask your question in the general forum of SQL.
Second, you might solve your problems with bind variable:
Insert tab
(sno, a, b, sum)
values
(: SNO,: A: B: A + B :))
You should not use sum as column name because it is a reserved word.
More you cannot insert into two different tables with a single SQL, but you can use PL/SQL to do this:
Start
insert into tab values (: SNO,: A: B: A + B :);)
insert into result values (: SNO,: A + B :);)
end;
If you meet sno from a sequence, you could do something like this:
Start
insert into values tab (seq_sno.nextval,:,: B,: A +: B) return sno in: SNO.
insert into result values (: SNO,: A + B :);)
end;
Hope that helps,
dhalek
-
GR 11, 2 Data Pump. Import the table in a schema into another schema
I have oracle stady. I export shema HR in the hrexport.dmp file. When I import tables from this file, I got hurt. I have used Enterprise Manager:
1. connected by SYSTEM user as USUAL
2 selected, choose the type of import - tables
3. the data in the file imported
4 selected tables to import tables
5. in the next step, I try to insert a row into the table remapping patterns and change the cell Destination Shema, but in the list is only one name of shema - HR! Why?
Published by: alvahtin on 10.03.2013 06:11ORA-39166: Object SYSTEM. EMPLOYEES were found.
ORA-39166: Object SYSTEM. The DEPARTMENTS was not found.
ORA-39166: Object SYSTEM. PLACES not found.Tables are not owned by system. Try
impdp system/oracle remap_schema=hr:inventory tables=hr.employees, hr.departments, hr.locations ........
-
Number of rows in the tables of a schema
Hello!
I compare the amount of lines in a diagram
Select "select count (*) ' |" table_name |' a ' | owner: '. ' || table_name | ';' from dba_tables
you could you please help me to create the script that will be displayed as lines in the table:
SQL > select count (*) MY_TABLE_NAME of MY_TABLE_NAME;
MY_TABLE_NAME
------------
1010 MY_TABLE_NAME1
thanks and regards,.
MY_TABLE_NAME2 20
Paveldeclare lcount number; lquery varchar2(200); begin for data in(Select * from user_tables) loop lquery:= 'select count(*) from '||data.table_name; execute immediate lquery into lcount; dbms_output.put_line( data.table_name ||----|| lcount); end loop; end;
-
Cannot change the table in a layer [was: another weird One]
I created www.ccahv.com with Dreamweaver MX and now seeks to update with Dreamweaver CS3. The buttons are in a table on a layer to easily copy, but I can't change the table to add a button. Impossible to insert an image. The pages are modified by a Secretary with Frontpage 2000. Who would have something to do with it. I am sure that I've updated these pages in June and October with the CS3 version. I am at a loss. Help!
joepd
[Subject line edited for clarity by Moderator]
First, fix the validation errors. You have the doctype declaration in the body.
> The buttons are in a table on a layer
Avoid layers unless they are necessary.
-
How to find the table in a schema, if I only have a particular column name
Hi all
Ideal if some1 could help me, I know not a column name and I need to find the table that actually holds this column paricular name I know.
is it possible to find this particular table with SQL?
Thank you
RahulSelect the table TABLE_NAME from user_tab_columns where column_name = 'COLUMN_NAME '.
-
the table in a schema hierarchy
Hello
How to find the hierarchy of tables in a schema?
the first independent tables show output then
tables of primary key and foreign key tables.
I ask for table.we only need in all tables in a diagram of how to the hierarchy.Visit this link...
http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:661009003696and your query might me something like...
select rpad( '*', (level-1)*2, '*' ) || table_name table_name from (select a.table_name, a.constraint_name pkey_constraint, b.constraint_name fkey_constraint, b.r_constraint_name from user_constraints a, user_constraints b where a.table_name = b.table_name and a.constraint_type = 'P' and b.constraint_type = 'R' union all select table_name, constraint_name, null, null from user_constraints where constraint_type= 'P' ) start with fkey_constraint is null --and table_name = '
' this is used when you want to know the hierarchy starting with a particular table. connect by nocycle prior pkey_constraint = r_constraint_name Ravi Kumar
-
Cut and paste the tables of a project to another
When cut and paste existing tables from one project to another, the weight of the line for the cell borders appear to vary randomly - some are the original line weight and some are heavier when pasted.
I tried to unravel with the properties of the table, but without result dialog.
Is there a quick fix or I'm better import in all subjects, then changing any theme?Hi Colum/Peter,
It is not a custom table, I just need to copy a table from one project to the other.
Blasted my developers (may the fleas of a thousand camels, etc), recently decided to change toolbars in one of our applications. As this toolbar appears in slightly different forms in about 6 tabs, I tried to update the table that shows which icon does what and cut and paste this table in all subprojects that I. Each table then needs only a minor modification for some this subproject-specific icons.
Peter on the right track. When I cut and glued to the table, it is also stuck in a number of lines of HTML associated with styles in the other project. If I delete these lines, the table will appear as it should.
Thanks for the quick reply
Maybe you are looking for
-
Cannot use firefox 'account not found.
For some reason any when download firefox for the first time, an error (supplied with the screenshot) and I can't use it. Despite not having an 'account' in the first place. It simply shows that error message, I hit 'ok' and the application closes, t
-
Airport Ext Radio stop broadcasting
This 3rd Gen airport Ext is in mode bridge as part of a network of Airport Time Capsule. The Extreme broadcasting this wireless diagnosis when the radio is off (Bridge Mode). When the extreme is physically disconnected from the supply, then Wireless
-
The new version of hotmail does not work on Firefox
Hello Hotmail this week updated their website, since then on Firefox, I can't seem to open, delete, compose, or do something with my emails. All I can do is to get into the Inbox and it is. I've been on Safari and seem to get all my emails as usual.
-
A few simple questions to mentally prepare for the test of CLAD. Are you allowed to ignore the questions and come back to them later? If this is permissible don't you think it's a good strategy to ANSWER all the easiest first? Do you have the right t
-
Windows updates cannot be update system. get the code of error 0x80072efe,
I tried all the possible solutions, but still get the updates of windows to the system, the error code is constantly on the screen. Help!