Create views on the owner assistance Board different pls

I'm stuck with a problem kindly help me out I want to create a view by selecting certain columns of a table to a different owner. I have the privileges but I am unable to do things.

Select the table table_name from all_tables where owner = "COMQDHB";

annoys me

TABLE-NAME
----------
GRADE
STUDENT
TEACHER

I want to create a view with only grade and student

IAM able create the whole table view
Create view v1 as select table_name from all_tables where owner = "COMQDHB";

but when I try to create the view with the selected columns

Create view v1 as select table_name (grade, student) all_tables where owner = "COMQDHB."

also, I tried to create the view entire table and then removing the teacher column, but I do not know the appropriate syntax.

change the view view_name remove teacher column;

Hello

I agree with John and David. What makes you think that there is a table, called table TABLE_NAME?

When you make this request:

select table_name from all_tables where owner='COMQDHB';

and you get these results:

TABLE_NAME
--------------------------------------------------------------------------------
GRADE
STUDENT
TEACHER

tells you that there is a column called TABLE_NAME in the ALL_TABLES view.
(When you perform a query, the result indicates the names of column above the horizontal line and the values below the line).
The TABLE_NAME column contains the values "RANK", "STUDENT" and "TEACHER", which indicates that there are some tables with these names.
If these three lines are the only exit from the query above, these three tables is the only tables belonging to COMQDHB, or at least the tables only three on which you (HAGGIS) have privileges.
I want to create a view with only grade and student

This point of view:

create view v1 as select table_name from all_tables where owner='COMQDHB';

shows a small subset of data contained in ALL_TABLES.

Your mission is to create two views showing different subsets of the data in the RANK, STUDENT and TEACHER tables, so that they will look something like this:

CREATE VIEW  public_info
AS
SELECT  ...
FROM    comqdhb.grade     g
JOIN    comqdhb.student   s  ON ...
JOIN    comqdhb.teacher   t  ON ...
WHERE   ...

Tags: Database

Similar Questions

  • Created view of the link of database on dg4msql a column type as long

    Hi all

    I read some views of SQL server using dg4msql to Oracle database 11 G r2.

    All work fine, except columns that are usually varchar2 are now of type LONG. It is the origin of the issues given the wide range of restrictions of data type long.

    Is it possible that when I create a view in Oracle such as:
    CREATE or replace view as v1 (
    select a1, a2, a3 from msqlserver_table@dblink)
    The columns do not come as long but as varchar2 upward?

    Problem, it is once its long form, I can't change it to a different format in a SELECT statement (as cast as varchar 2 etc.).

    Thank you.

    Published by: xarg-Xrc on October 3, 2012 19:26

    Add these 2 parameters to your gateway init file:
    HS_KEEP_REMOTE_COLUMN_SIZE = LOCAL
    HS_NLS_LENGTH_SEMANTICS = CHAR

    It allows me to describe the nvarchar sunk to the varchar column (4000) in Oracle as varchar2 (4000).

    P.S.: Please make sure you open a new connection to gateway (for example to launch SQL * newest) when you have changed a setting gateway as changes in the bridge file are read at the beginning of a new gateway connection handshake.

  • create view does not work with the role of resource

    I just upgraded from 10.2.0.1 to 11.1.0.7

    the role of resource users could create views on the old database...
    now, they can't
    ORA-01031 insufficient privileges

    I have to give them create it all discovers the system privileges

    (1) I assume you mean that you gave them the CREATE VIEW privilege. Not CREATE ANY VIEW. The latter would allow them to create a view owned by another user who would be dangerous enough.

    (2) it is not related to the role of RESOURCE. It is almost certainly related to the CONNECT role. CREATE VIEW (among other privileges) has revoked the CONNECT role in point 10.2. I don't know why your 10.2 database was working, I guess that you updated from an earlier version, in which case the update may not have removed the privilege correctly (see Metalink: 317258.1).

    (3) you certainly don't want to use the CONNECT role or RESOURCES in the application of the production. Were the roles of the sample which have been overloaded with privileges for the various elements of the sample code. You should really create your own roles with of whatever your users must actually rather than using these predefined roles of privileges.

    Justin

  • Table alias when creating views in KM

    Hi all
    When an interface running I noticed that he failed on stage - LKM
    Create View on the Source

    (LKM MSQL to MSQL)

    On the survey, I found the error was due to an invalid alias in (created alias is a keyword in sql server) that ODI had attributed to the source table. I have extracted the code from the KM and I am hoping someone could point me on how I could change the KM for the ODI alias creates is different what its currently set to.

    TIA
    MN

    MN, you don't need to change the KM, when you click on the required data store, you will find the alias name, it change accordingly, or in the data store itself. I think that should help you.

  • Creating views for DB XML content in Oracle 9i (9.2.0.4.0)

    Hello

    Please excuse my ignorance but I searched on through reams of documentation on Oracle XML DB and is extremely difficult to get information about a specific version when it evolved as radically. I develop on Oracle 9.2.0.4.0 (I'd be happy to upgrade but unfortunately my clients are less enthusiastic!).

    My questions are how and why I would create views of the XML data to use in my application. I made a snippet of XML data (according to an XSD) that I need to load into the database and then provide view in read-only data. I managed to save my drawings and insert the XML into the underlying structures of the object relationship and I now need to create views.

    For as much as I can muster in 9i I must query XML data using extractValue, for example:
     
    SELECT extractValue(xseq.column_value, '//ReferenceNumber') REFERENCE 
         , extractValue(xseq.column_value, '//ProviderName') PROVIDER_NAME 
    FROM   EXTRACT e 
         , TABLE(XMLSequence(extract(VALUE(e), '//Registration'))) xseq; 
    I also managed to get the same results by directly accessing the column 'hidden ': XMLDATA
     
    SELECT xml."ReferenceNumber" REFERENCE, xml."Provider"."ProviderName" PROVIDER_NAME 
    FROM   EXTRACT e 
         , TABLE(e.xmldata."Registration") xml 
    Issues related to the:
    (i) they are the only options I have to access the XML data in Oracle 9i? (XMLTable() looked quite interesting, but was unfortunately introduced in 10g)
    (II) given that I only need a read-only view of the data, are there benefits (other than speed) to be stored in object-relational tables as opposed to a CLOB?
    (III) is there a problem using the second method (cleaner) in relation to the first?

    Thanks a lot for you help,

    Tom Casserly

    (I) Yes. I'm sorry.
    (II) speed is the main advantage for storage GOLD regarding lead content (instead of CLOB--> pilot document by) queries. Other things I can think of is that it comforms to an XML schema, which is an advantage (you know that obey your XML file is the format defined) and a disadvantage (validation / grinding / and internal indexing off XML data will cost you performance).
    (III) it is (I think) not supported, less efficient then TABLE (XMLSequence (extract ()))

  • Is there a way to create a button etc to get different views of the same page?

    I have a page full of product images and wants to give the viewer an option to choose the size of the images on the page. So far, I just had two different pages with the same images and created a hyperlink button to switch between views. The reason why I want to get the two points of view on the same page, is I want to use the same name for each page. Muse won't let me create two pages with the same name, so now I have a parent page "Products" (with large images) and its child page "products 2" (with the small images) with a hyperlink linking them. "» This also creates a problem in the menus, since the 'product 2' does not have the active menu bar.

    I have the same problem with the creation of the site in different languages. I would like to make a simple drop-down list with options "Suomi" and "English". What I have to create two different sites in two different languages and have just the hyperlink connect for example home pages?

    Thanks for the tips!

    You can use any number of widgets to create online pop-overs / hover pods / galleries. Lightbox to the ToolTip, anything is possible. The language issue to indeed create individual sites and crosslink them.

    Mylenium

  • How to create different types of analog inputs without using the DAQ assistant?

    Hi all

    I would like to create multiple entries multiple analog channels of type... I mean I want to have the voltage of 5 and 2 channels of temperature...

    However, I am not using the DAQ assistant. I use "create channel" vi.

    Can anyone suggest me please how to do / I submit my VI for reference... I have 5 tensions, and 2 temperature characterized as showing these 2 two separate graphics...


  • Create view with different schemas

    Hello

    I would like to create a view using data on different patterns.

    For example, user A has a table1 and user B has also a table1.
    On the schema user C, I would make a union of two table in the same point of view as:

    If user C is running:

    Select * from A.table1
    Union
    Select * from B.table1

    It's ok, but when I try:

    CREATE or REPLACE view view_table1 AS FORCE
    Select * from A.table1
    Union
    Select * from B.table1

    It returns the ERROR at line 0: ORA-01031: insufficient privileges

    But the C user has SELECT ANY TABLE, update ANY TABLE, DELETE ANY TABLE,... rights

    Someone has an idea?

    Thank you!

    Published by: bushi893 on August 30, 2010 19:53

    When you create a view containing the object of different owners, the other owners have to grant "with grant option" to the owner of the view. Thus, the view owner can grant to other users or patterns...

    Example: The latter is the owner of a table called mine_a User_b is the owner of a table called yours_b

    Let's say user_b want to create a view with a join of mine_a and yours_b

    To see it working properly, it must give "grant select on mine_a to user_b with grant option.

    Then user_b may grant select on this point of view to everyone.

  • Cannot create or rename the new folders, cut and paste to a different destination

    Whenever I try to create a new folder it tells me that the file or folder does not exist when I cut paste in different folder does nothing so I have to drag-and - drop in different areas of my laptop to get the file where I want it to be.
    My OS is vista please anything you can do I appreciate it thanks

    Hello Young Ceaser,

    Thank you for using the Microsoft Windows Vista Forums.

    Have you always had this problem with the creation of a new folder?  When you try to create that file to?  Please let us know status.  Thank you!

    I'd like to experience for me to better understand the potential cause for what you are experiencing.

    What we will do is create a new folder in your user profile directory and test the availability of renaming.

    We also create a folder on your desktop and attempt to appropriate to see if we can then rename it.

    Here are the steps to do this:

    Click Start-> click on your username at the top right of the menu.

    In the new window, click on organize-> then new folder

    Check your ability to rename.

    From there, double-click the desktop folder.

    Take the same steps to create a new folder, test the name change.

    Then, on an issue that you cannot rename, test this procedure:

    To take ownership of a folder:

    Right-click the folder for which you want to set permissions, click Properties and then click the Security tab.

    Click Advanced to open the security settings advanced for the dialog box .

    Click on the owner tab, click on change. If you are prompted for an administrator password or a confirmation, type your password or click on continue.

    In the new security settings advanced to box, the change in ownership to: field, select your username and check Replace owner of subcontainers and objects. Click OK, repeat for the other boxes. (If your username does not appear click on the button other users or groups to add your account).

    Try to rename the folder.

    Once you are complete with tests, you can delete the folder created by right-clicking on them and selecting Remove.

    Engineer James Microsoft Support answers visit our Microsoft answers feedback Forum and let us know what you think.

  • Granting select permission on the view to the schema of the database different.

    Dear all

    I need schema view 'data_model_eb' APPS to grant select permission on a different database schema "HHS" on another server.

    Kindly help me to create the link to the db and grant the select permission.

    Thank you.

    You have two solution, but I think the second One is the best for you, what is your version of the database!

    create view  as select * from table_name@dblink
    grant select on  to USER;
    

    OR create a PUBLIC database link

  • Easy to change the owner of the TABLE (and according to indexes and views) available?

    I want to change the Owver from a TABLE (and the owner of all VIEWS and INDEXES in function).
    The only way that I know so far is something like

    CREATE TABLE < newschema >. < table_name > select * from < oldschema >. < tablename >;

    Then, slide old TABLE
    Recreate it possible all the CLUES and the views.

    It is kind of bulky.
    Especially when I don't know what indexes exist for a certain TABLE.
    When I investigate this and I have found 4 indexes so much work needs to be done.

    Is there a shorter, smarter way to accomplish the task.
    I prefer a SINGLE task of all-for-statement

    :-)

    Thank you
    Peter

    Hello
    export of diagram a (exp or expdp)
    import in diagram B (imp or impdp)

  • Customization of the KM to create the view on the target

    Hi all.

    I need to work with DBLinks in my project. But I do not have the rights to create something in my sources. So, I took the LKM Oracle (Oracle DBLINK), duplicate and began to change.

    All orders executed on the source, I changed to run it on the target (scheme of work). I created an option called DBLINK_NAME to receive my DBLINK.

    The code is the following:

    create or replace view < %=odiRef.getObjectNameDefaultPSchema ("L", "", "W") % > < % = odiRef.getInfo ("COLL_NAME") % >
    (
    < % = odiRef.getColList ("", "[CX_COL_NAME]", "\n\tclick", "", "") % >
    )
    in select < % = odiRef.getPop("DISTINCT_ROWS") % >
    < % = odiRef.getColList ("", "[PHRASE]", "\n\tclick", "", "") % >
    from < % = odiRef.getSrcTablesList () % > < % = odiRef.getOption("DBLINK_NAME") % >
    where (1 = 1)
    < % = odiRef.getFilter () % >
    < % = odiRef.getJrnFilter () % >
    < % = odiRef.getJoin () % >
    < % = odiRef.getGrpBy () % >
    < % = odiRef.getHaving () % >


    But the OdiRef.GetFrom () returns the following result set:

    OWNER. DATASTORE_ALIAS DATA STORE

    And when it runs the command, I got the following code:

    SYSFID. TABLE_CARDS T1@DBLINK_DEV

    And I need to return the owner.datastore without the alias:

    SYSFID. TABLE_CARDS@DBLINK_DEV

    Also, I need for my @DBLINK_NAME for each table that is used as a source of concatenate.

    I need help on this, urgent.

    Kind regards.
    Luiz Araujo (aka Buchu_VP)

    For the alias, use:

    SELECT '< %="odiRef.getSrcTablesList" ("",="" "[schéma].="" [="" res_name]"\+odiref.getoption="" ("dblink_name")="" \="" +="" « [pop_tab_alias] »,="" «, », » »)="" %="" >="" '="">

    Cezar Santos
    http://odiexperts.com

  • How to create views of data from different databases tables in2

    Using Oracle 10.2 g

    I have 2 databases Gus and the haggis on schema Comqdhb.

    Glink indicates a link of database between Haggis and Gus

    In Gus, there is school that contains columns with same name upn, grade, subject, student of tables...

    STUDENT
    UPN
    academicYear

    Object

    Object

    GRADE
    examlevel
    grade

    SCHOOL
    SN

    In HAGGIS raising tables, grade, teacher containing columns upn... desc below.

    STUDENT
    UPN

    GRADE
    grade
    UPN
    academicyear
    level



    Create views in your database HAGGIS who join their all the qualities of the review. You should have a point of view that will produce the following relationship:
    examGrade (upn, subject, examlevel, sn, rank, academicYear)

    So I need to create a view that gets the data from the tables in the databases.

    create view as examGrade (upn, subject, examlevel, sn, rank, academicYear) like some s.upn


    But I don't get the selection of a column of 2 tables in different databases

    I mean if I said

    Select the UPN in comqdhb.student@glink,comqdhb.student;
    Select the upn name in comqdhb.student@glink,comqdhb.student
    *
    ERROR on line 1:
    ORA-00918: column ambiguously defined

    Help me, thank you.

    Hello

    Rider wrote:
    The issue is that I can't understand that I should create the view by the union of the haggis and the two gus data or only haggis.
    the reason I believe I need to combine the two is mentioned * "" create views in your database schema HAGGIS who join their all the qualities of the review. ". *
    By the mention of creating views and who join their all the qualities of the review, it probably means to obtain the data of the GUS and HAGGIS.

    This is my interpretation of the assignment, too.
    If you ask just the tables on Gus, you will get the ranks of three of the four schools: it's not all examination classes.
    If you ask just the tables on Haggis, you will get the ranks of any of the four schools: it's not all examination classes.

    2nd prob is that if have decided to create a view that gets the data from these two gus and therer haggis would be a lot of duplication involved due to the cross product

    Why would there be "repetition involved due to the cross-product"?
    If the quuery of Gus produces 100 lines, the request of product Haggis 30 rows, then the UNION of the two will have 100 + 30 = 130 lines (assuming, as you say, each student is at school only one).

    the query I wrote is

    Create view examGrade (upn, subject, examlevel, sn, rank, academicYear)
    as
    Select distinct s.upn as upn, g.subject as topic,
    g."LEVEL" as examlevel, g.grade as rank, to_number (g.academicyear) as academicyear
    of s comqdhb.student, comqdhb.grade g
    s.UPN, sb.subject, g.elevel, g.grade, s.acyr select Union
    of comqdhb.subject@glink sb,comqdhb.student@glink s,comqdhb.gradevalues@glink g;

    You should not write, not to mention not formatted zip code. I have a little time I can devote to answering questions in the forum. Do you want me
    b spend this time formatting your code, so I can understand the question, and no time to answer, or
    b spend only a little time reading understanding your code and spend most of my time to help you?
    I would prefer (b), but the choice is yours.
    See the statement that I posted in my last post for an example of the formatted code. You see how it appears in a box with a police fixed-width, and multiple spaces are printed? This is because I typed {code} (all small letters), before and after the section I wanted formatted.

    At least put each table in the FROM clause on a separate line, so it is easy to know if you have enough join conditions.
    If you have N tables in the FROM clause, you almost always have at least N-1 join conditions that specify how the tables are linked together. For example, if talk you about two tables, quality and student, you expect to see a join condition that tells you when you have data in a table, how to find related data in the other table, such as

    g_gus.upn = s_gus.upn
    

    No no no join conditions will cause "repetition involved due to the cross product.

    I downloaded my info here
    http://www.upload4free.com/download.php?file=44201983-School_ExamGrades.PDF


    http://www.upload4free.com/download.php?file=184648736-ExamGrades_Case_Study_2008FINAL.PDF

    Sorry, if there is data as long as you can't post here, there is much too much for me to read.
    Make a sample set, containing a few (maybe five) students and a few shades of each student. It is fine to copy a few lines of your actual data.

    That's all the time I have for today. I can't wait to get the data and formatted requests.

  • How to create a view in the DB table for some servers

    Hello

    We need create a country table which will contain data for countries.

    I want to create it in such a way that it will be common for all servers - but as a point of view. not the real table, only the data and views do not change.

    How can I do?

    Thanks in advance

    Are you sure you want to say 'tablespace '? A tablespace is a collection of data files. It has nothing to do with the privileges of the object, object namespaces, etc. I'm guessing that you mean that you have two schemas, OBITUARIESCS and ADVERTISEMENTCS. A schema is a collection of objects of database belonged to a particular user. A single table can exist in spaces of multiple tables (assuming it is partitioned). Different schemas can have an infinite number of tables with the same name in the same table. The database schema is the namespace for objects such as tables.

    Assuming that you have two schemas in your database, you can create a table of COUNTRIES in the OBITUARIESCS schema. You can then grant SELECT access on the table to another user, ADVERTISEMENTCS, i.e.

    GRANT SELECT ON country TO advertisementcs
    

    You can then ask questions (but not change) the COUNTRY code of the property of ADVERTISEMENTCS table

    SELECT *
      FROM advertisementcs.country
    

    If you want to be able to remove the prefix in the schema, you can create a synonym. In the ADVERTISEMENTCS schema

    CREATE SYNONYM country
      FOR advertisementcs.country
    

    and then when the code of the property of ADVERTISEMENTCS wants to query the countries table, it can just

    SELECT *
      FROM country
    

    Justin

  • Paragon/Ghost: Create a bootable clone between the (hard drives of different sizes to)

    I was web-searching options of backup in the last days and want to settle on a solution of freeware Paragon or Ghost (I know that the latter meets the needs, but I wonder if the first can do with relative ease for a beginner). Here's the scenario:

    My current Toshiba Satellite A660 (PSAW3C-047017 model) running Windows 7 Professional 64-bit. The HARD disk is the disk HARD MK6465GSX from Toshiba (http://storage.toshiba.eu/cms/en/hdd/multimedia/product_detail.jsp?productid=341). I bought a small (500GB) Seagate Momentus XT, which has apparently Advanced Format. I guess the Toshiba HDD 512 bytes/sector, because nothing comes up in a search on the web for Advanced Format for this HARD drive.

    I would like the Momentus XT allows you to create a bootable to my Toshiba HDD clone. The Momentus XT will be in a pregnant that will interface to the portable computer via eSATA. After cloning for the Momentus XT, I would replace my Toshiba HDD in the laptop with the Momentus XT due to its superior performance. The Toshiba HDD becomes my HDD auxiliary (in the external case) for the cloning of the weekly. If nothing ever happens to the Momentus XT in the laptop, I can then take the Toshiba HDD out of the enclosure and put it in the laptop. However, this mode of use of the means I have to be able to clone initially Toshiba HDD Momentus XL, then clone in the other direction later.

    I read a lot about needing to be trendy, but not having alignment issues do not image, cloned, or formatted a hard drive before (except obey blindly support), I'm foggy on the understanding. Seagate announced their SmartAlign technology, but there is no corroboration on its effectiveness and no info about HARD drive models have it. Because Windows 7 is described as supporting the AF, I guess that many of the issues identified by SmartAlign are nonissues to me.

    My concern is that if there are other traps due to the corresponding HDD sizes and sectors that could create problems for the cloning process, both the Toshiba HDD for the Momentus XT and vice versa. Consequences (and solutions) I'm trawling for are the inability to create a clone bootable, the completeness and accessibility of the clone and align content makes this performance impact (with the exception of those to avoid due to the use of Windows 7).

    A friend I know that Ghost will properly manage the HARD disk and differences in size of the sector gracefully, avoiding the above consequences. I was wondering if freeware Paragon will handle this scenario as well. Paragon is free, but apart from the functional qualities, I would also consider ease of use in order to take a decision on the two.

    Thanks for any comment on the ability of Paragon freeware to manage this scenario, the comparison of usability of Paragon & Ghost for this scenario, and anything else you think is relevant in the choice between them for my scenario.

    Hello

    > Thanks for any comment on the ability of Paragon freeware to manage this scenario, the comparison of usability of Paragon & Ghost for this scenario, and anything else you think is relevant in the choice between them for my scenario.
    In my opinion, this question should be forwarded to the Paragon supports.
    http://www.Paragon-Software.com/support/
    Check the knowledge base or the forum of the community.

    From my point of view, you must first create a Toshiba Recovery disk.
    In this case, you are always secure you can set the laptop back to factory settings, even if the HARD drive was going to die or the system would begin to run crazy.

    I have used Ghost in the past in order to back up my files. I created an image of my two partitions bootable file and this race smoothly unfortunately cannot say on Paragon or compare both applications.

Maybe you are looking for

  • Problem in Skype worm 7.18.0.112

    I had a previous worm of Skype works well with my laptop with Windows 7 OS. Recently, I had to reinstall the operating system Windows 7 and when I when I downloaded Skype, worm 7.18.0.112 downloaded. Download & install was smooth, but when I try to u

  • Satellite C650D - resettlement is stuck

    Hello I have a Satellite C650D, who became very slow, so I decided to do a clean install. Everything seemed to go well and it restarted and then he inquires finishing installation. He proceed to install 40, which went well. It seems then automaticall

  • How can I make a program launch at startup?

    Hello How to make a program (Outlook for example) start when starting my PC to the top? Thank you

  • Mixture of software Blackberry blackBerry for Z3

    Dear all, Introduction of the Blackberry mixture is a very good decision. With, I hope that we can access our balckberry devices completely. But why is that it is limited to the Passport only. I am tired with Z3 it did not work. Z3 is also a recent i

  • Disable the window "program does not.

    I have a problem for Windows 7 running a previous custom program.  I have a touch screen program that is running in a public space.  When the user quickly touch the screen more quickly that the program can meet a "x program has stopped responding" wi