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.

Tags: Database

Similar Questions

  • create the different logfile with different schema by coil

    Hello
    I want to know how to create a different log file depend on different schema
    I have two patterns on the same db Server
    (1) drawing kennam / * / kennam
    (2) diagram koonhey / * / koonhey
    in a way, I want to create a log file name different for example kennam.log / koonhey.log on these two patterns...
    I always run @showbalance; to run showbalance.sql to create this report...
    I hope you understand what I'm talking about (English is not my mother tongue...), anyone could help?

    showbalancelog. SQL
    coil c:\log.log+.
    spool c:\log.log
    select to_char(sysdate,'dd-mm-yyyy hh:mi:ss') from dual;
    column com_name format a20;
    select cus.tid, cus.com_name com_name, cus.com_balance, 
    NVL((select sum(invoice_total) from invoice where com_id=cus.tid),0) sum_invoice, 
    NVL((select sum(cheque_amount) from income where com_id=cus.tid),0) sum_income, 
    cus.com_balance - 
    NVL((select sum(invoice_total) from invoice where com_id=cus.tid),0) + 
    NVL((select sum(cheque_amount) from income where com_id=cus.tid),0) total_balance
    from customers cus
    order by cus.tid;
    spool off

    Hello devotee,

    You can select the user in a variable and then use that variable in your file name:

    COLUMN act_user NEW_VALUE act_user NOPRINT;
    SET TERMOUT OFF
    SELECT USER act_user
    FROM    dual;
    SET TERMOUT ON
    SPOOL t:\log_&act_user..log
    
    SELECT  'My data'
    FROM    dual;
    
    SPOOL OFF
    

    Concerning
    Marcus

  • Problem creating view with parameters

    Hello

    I'm new with PL/SQL and I am trying to create a view that accepts parameters. I have two tables that I merged with UNION first of all, I would like to notice what to do with the query parameters. It looks like this:

    TABLE 1
    col1,
    col2,
    COL3

    TABLE2
    col1,
    col2,
    col3,
    COL4,
    col5

    View:
    CREATE VIEW ALL_ADM_VIEW AS SELECT COL1, COL2, COL3 FROM
    (SELECT COL1, COL2, COL3 FROM TABLE1
    UNION COL1, COL2, COL3 FROM TABLE2
    WHERE CURRENT_DATE IN TABLE2. COL4 AND TABLE2. COL5) U
    WHERE U.COL3 = 'PARAMETER';

    I need to put the value of the parameter 'PARAMETER' for the view. Any help?

    Thanks in advance

    Create your view like this:

    CREATE VIEW ALL_ADM_VIEW AS
    SELECT COL1
          ,COL2
          ,COL3
    FROM   TABLE1
    UNION
    SELECT COL1
          ,COL2
          ,COL3
    FROM   TABLE2
    WHERE  CURRENT_DATE BETWEEN COL4 AND COL5
    ;
    

    When you use the view in your code, this is where you use your variable:

    select ...
    from   ALL_ADM_VIEW
    where  COL3 = 'PARAMETER';
    
  • How to create view with tabs using the screens?

    Hello friends,

    I am aware of the view by using Manager tabs. I want to create the view tab by using the display instead of Manager.

    What is someone is aware of this kind of stuff?

    Thank you

    Salvi Alexander

    and what made features screen offer Manager does not offer?
    I've set up a couple of tabs, but it would be difficult to do with several screens.

    the advantage of using managers, is that you have a single control bar. If you use multiple screens each would need an instance of the command bar, you have to take care that they all display the same status and management of the screen would be difficult.

  • Create cluster with different server

    Hi all, am new to this form and you need assistance in the creation of a new cluster of 2 servers who are of different brand and different configurations

    Server 1

    Acer altos g540

    Which is to have double Socket CPU

    20140612_171052.jpg

    Server 2

    Dell poweredge T320

    Which is to have one CPU socket

    20140612_171042.jpg

    What would be the best practices by creating an HA cluster license. which CVS option should I have chosen during the creation of the cluster.

    Thank you

    Sharath Shashidhar

    Welcome to the community.

    to know if different hosts (UC) support a common mode of EVC, search for the hosts in the VMware Compatibility Guide and click on the link of model of CPU for more information on EVC modes supported.

    André

  • Read XML with different schema definitions

    Hello

    I have a XML stored in an XMLTYPE table and I have no problem to read the first part (ELMAHeader)

    WITH t AS(
    SELECT XMLTYPE(
    q'[<?xml version = '1.0' encoding = 'UTF-8'?>
    <ELMAKM xsi:noNamespaceSchemaLocation="./KM/01.00/ELMAKM_000001.xsd" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:km="http://www.zivit.de/KiStA/KiStAM/V1.0/KiStA-KiStAM-Anfrage">
       <ELMAKOM>
          <ELMAHeader ELMAKMVersion="1">
             <AuthSteuernummer>BG</AuthSteuernummer>
             <AccountID>11</AccountID>
             <KundeneigeneID>1</KundeneigeneID>
             <Verarbeitungslauf>PROD</Verarbeitungslauf>
             <ErstellungsDatum>2014-09-16</ErstellungsDatum>
             <ErstellungsZeit>11:00:27.7</ErstellungsZeit>
          </ELMAHeader>
          <ELMAVerfahren>
             <KISTA_KM_ANTW UUID="0345" OrdBegriff="SLD" 
             xsi:schemaLocation="http://www.zivit.de/KiStA/KM/01.00-r000001 ./KM/01.00/ELMAKM_KISTA_000001.xsd" 
             xmlns="http://www.zivit.de/KiStA/KM/01.00-r000001" 
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
             xmlns:k="http://www.zivit.de/KiStA/Std/01.00-r000001">
                <KiStAV_DL Zulassungsnummer="2"/>
                <KiStAV Zulassungsnummer="2" Name="SLD"/>
                <Antwort xsi:type="AntwortArt3" UUID="0f" KdOrdBegriff="4">
                   <ReturnCode>1</ReturnCode>
                   <Anlass Datum="2014-08-11" Grund="1"/>
                   <PersAngabe>
                      <Person>
                         <k:NName>B</k:NName>
                         <k:VName>Y</k:VName>
                         <k:GebDt>1944-10-11</k:GebDt>
                      </Person>
                      <Adresse xsi:type="k:InlandsAdresse">
                         <k:Str>A-Str.</k:Str>
                         <k:HausNr>5</k:HausNr>
                         <k:Ort>M</k:Ort>
                         <k:Plz>8</k:Plz>
                      </Adresse>
                   </PersAngabe>
                </Antwort>
             </KISTA_KM_ANTW>
          </ELMAVerfahren>
       </ELMAKOM>
    </ELMAKM>]') x FROM dual
    )
    SELECT  x
           ,elma.ELMAKMVersion
           ,elma.AuthSteuernummer
           ,elma.AccountID
           ,elma.KundeneigeneID
    FROM    t
           ,XMLTABLE(
                '/ELMAKM/ELMAKOM/ELMAHeader'
                PASSING t.x
                COLUMNS ELMAKMVersion       VARCHAR2(8)     PATH '@ELMAKMVersion'
                       ,AuthSteuernummer    VARCHAR2(10)    PATH 'AuthSteuernummer'
                       ,AccountID           VARCHAR2(10)    PATH 'AccountID'
                       ,KundeneigeneID      VARCHAR2(10)    PATH 'KundeneigeneID'
                ) elma
    ;
    

    But how can I read the second part (ELMAVerfahren)? I tried several selects, but I get no results, for example

    WITH ...
    SELECT  x
           ,elma.UUID
    FROM    t
           ,XMLTABLE(
                XMLNAMESPACES(
                    DEFAULT './KM/01.00/ELMAKM_KISTA_000001.xsd'
                    ,'http://www.zivit.de/KiStA/KiStAM/V1.0/KiStA-KiStAM-Anfrage' AS "km"
                    ,'http://www.zivit.de/KiStA/Std/01.00-r000001' AS "k"
                    ),
                '/ELMAKM/ELMAKOM/ELMAVerfahren/KISTA_KM_ANTW'
                PASSING t.x
                COLUMNS UUID       VARCHAR2(8)     PATH '@UUID'
                ) elma
    

    Version of DB

    Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production

    Concerning

    Marcus

    Hi Marcus,

    If you declare a namespace by default using the with XMLNamespaces clause, it will apply to all items not qualified, referenced by the XQuery expression.

    In your attempt, ELMAKM, ELMAKOM and ELMAVerfahren are treated as part of the namespace by default, which is false as nodes are in any workspace names.

    To manage this kind of situation, where there is default redefinitions of namespace in the tree, you must declare a prefix:

    SELECT x

    elma. UUID

    T

    XMLTABLE)

    XMLNamespaces ('http://www.zivit.de/KiStA/KM/01.00-r000001' as "ns0")

    , ' / ELMAKM/ELMAKOM/ELMAVerfahren / ns0:KISTA_KM_ANTW.

    PASSAGE t.x

    UUID VARCHAR2 COLUMNS (8) PATH '@UUID '.

    ) elma

    ;

  • How to read the data with different XML schemas within the unique connection?

    • I have Oracle database 11g
    • I access it via JDBC: Slim, version 11.2.0.3, same as xdb.
    • I have several tables, each has an XMLType column, all based on patterns.
    • There are three XML schemas different registered in the DB
    • Maybe I need to read the XML data in multiple tables.
    • If all the XMLTypes have the same XML schema, there is no problem,
    • If patterns are different, the second reading will throw BindXMLException.
    • If I reset the connection between the readings of the XMLType column with different schemas, it works.

    The question is: How can I configure the driver, or the connection to be able to read the data with different XML schemas without resetting the connection (which is expensive).

    Code to get data from XMLType is the implementation of case study:

     1   ResultSet resultSet = statement.executeQuery( sql ) ; 
    2   String result = null ;
    3    while(resultSet.next()) {
    4   SQLXML sqlxml = resultSet.getSQLXML(1) ;
    5   result = sqlxml.getString() ;
    6   sqlxml.free();
    7   }
    8   resultSet.close();
    9    return result ;

    It turns out, that I needed to serialize the XML on the server and read it as BLOB. Like this:

     1    final Statement statement = connection.createStatement() ;  2    final String sql = String.format("select xmlserialize(content xml_content_column as blob encoding 'UTF-8') from %s where key='%s'", table, key ) ;  3   ResultSet resultSet = statement.executeQuery( sql ) ;  4   String result = null ;  5    while(resultSet.next()) {  6   Blob blob = resultSet.getBlob( 1 );  7   InputStream inputStream = blob.getBinaryStream();  8   result = new Scanner( inputStream ).useDelimiter( "\\A" ).next();  9   inputStream.close(); 10   blob.free(); 11   } 12   resultSet.close(); 13   statement.close(); 14  15   System.out.println( result ); 16    return result ; 17
    

    Then it works. Still, can't get it work with XMLType in resultset. On the customer XML unwrapping explodes trying to pass to another XML schema. JDBC/XDB problem?

  • How to create objects with names being together &amp; quot;. on the fly &amp; quot;?

    Hello world

    I don't know how to create objects with different suffixes in their references "built" on the fly via loop 'for '. I mean, it's, 'typical' how to create a few sprites could be:

    var sprite1:Sprite = new Sprite();
    var sprite2:Sprite = new Sprite();
    container.addChild (sprite1);
    container.addChild (sprite2);

    and what happens if we want to create 100 these objects to aid 'for' loop so that we do not need to type:

    var sprite1:Sprite = new Sprite();
    var sprite2:Sprite = new Sprite();
    var sprite3:Sprite = new Sprite();
    var sprite4:Sprite = new Sprite();
    ...
    var sprite100:Sprite = new Sprite();

    the question is to know how to "integrate" the number name of the instance of the object during the creation of objects of mass? I remember some old "eval" and the square brackets "["objectName"+ objectId]" magic spells, but they do not seem to work in AS3

    Greetings

    :

  • Create the form on table in the different schema

    Hi all

    in APEX I am logged in as long as user APEX_USER and the table, I'm trying to access the site with the creation on Table Wizard form belongs to the user. I have granted all privileges on a given user APEX_USER table, the wizard allows me to choose this table in the list, but when I press the next button, I get the following error message:

    You do not have access to the schema that you import. Import failed.

    Contact your administrator for the application.

    Seems to me that something similar had been already discussed here, but still no response.

    V4.1 assistants when you use a different schema

    Please, what are the rights must have my APEX_USER to be able to create forms tables belonging to someone else?

    Thank you very much

    Pavel

    Edit: I did the same thing on my laptop (APEX 4.2.6.00.03) here and it works as expected. This error I get to work with APEX 4.2.3.00.08 (of course you should not necessarily be the cause, very likely, I don't have all of the necessary privileges) :-).

    Hi Mike,.

    Thanks again for your response. If the schema was not related to my workspace, I would yet be able to choose the other schema of the selection list.

    In fact, there seems to be a bug in the link in my message original (for example it is still not fixed in version 4.2.3), but fortunately I was able to find a workaround - I created a view with the same name and the same structure as the original table, and then I was able to generate the form with the wizard , finally I gave up the display and modification of processes page manually. So the solution is I have to force the DBA APEX upgraded to the current version :-).

    Best regards

    Pavel

  • 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.

  • creating views in a new scheme to access some rows of the tables in the source schema

    Hello

    Oracle 10.2.0.4

    We try to hide some data from some users. My suggestion is that we create a new view_schema scheme on the same instance where we said the source tables in source_schema.

    We then create views in view_schema as below

    CREATE VIEW AS SELECT * FROM source_schema.table where COLUMN_n = "XYZ";

    We then grant SELECT on these views to a role and assign this role new users to be able to consult the data consulted.

    If the questions below.

    1. We can create views to view the data in another schema WITHOUT giving SELECT permissions on source_schema.tanle directluy?
    2. It works and there is no need to create synonyms etc.
    3. YOU can manage users and much easilier view (s)

    Is there a sense and who better than the selection seen with say table_name_view in the source schema to this effect and even the creation of synonyms for these points of view with the same name, yasmina in sourece_schema?

    Thank you

    905989 wrote:

    Hello

    Oracle 10.2.0.4

    We try to hide some data from some users. My suggestion is that we create a new view_schema scheme on the same instance where we said the source tables in source_schema.

    We then create views in view_schema as below

    CREATE VIEW AS SELECT * FROM source_schema.table where COLUMN_n = "XYZ";

    We then grant SELECT on these views to a role and assign this role new users to be able to consult the data consulted.

    If the questions below.

    1. We can create views to view the data in another schema WITHOUT giving SELECT permissions on source_schema.tanle directluy?
    2. It works and there is no need to create synonyms etc.
    3. YOU can manage users and much easilier view (s)

    Is there a sense and who better than the selection seen with say table_name_view in the source schema to this effect and even the creation of synonyms for these points of view with the same name, yasmina in sourece_schema?

    Thank you

    1. you can create the view in another schema (first granting of privileges to the schema of the view) without granting privileges of the schema of the source

    2. you probably want to create public synonyms for the view (s).  You can refer to the view as schema.view, but it's bulky

    3. I'm not sure management is easy, but the extra complexity shouldn't be too bad.  Write the documentation describing how everything works and the object involved.

    Another, more complicated, but more powerful option is to use row-level security also known as the virtual private database - if you have the license.  You create a profile for a table and a procedure to generate the WHERE clause to filter a query against the table and the columns defined in the profile.  Yet once, you need license to do this.

  • 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

  • Creating objects with their corresponding schemas or as SYS

    Hi all

    Which is preferable? Creating objects with their corresponding schema/username, or simply use SYS to create all objects? Y at - it an advantage or a disadvantage? Are all best practices regarding that?

    For example, I have to create several objects in several different schemas (hr, oe, scott, Bishop). I could either connection in each schema individually and create objects, OR I could just connect as SYS as create them all at once. Is there any problem with the latter approach?

    Thank you.

    The rule was stated by Oracle years... do not connect as SYS... ever... except for purposes of maintenance or backup with RMAN.

    Advice is always to create the schema of the application, log in as the owner of the application, and create objects as long as this user. Do not follow this advice, all to often, end us with the created objects where they belong... often clues belonged to SYS.

  • How to create components of ADF BC as EO 'view with INSTEAD of trigger.

    I have a 'vision with INSTEAD OF trigger' on an external schema. is it possible to create the ADF EO on top of this point of view in my local schema?. If possible, then it is possible to insert/update this portal uses standard data ADF controls and module application.? I'm trying to see if it is possible with the standard controls of ADF without calling pl/sql API for insert/update this external table. any ideas are appreciated.


    --

    Kind regards

    Surya

    http://stegemanoracle.WordPress.com/2006/03/15/using-updatable-views-with-ADF/

  • How to create Table View with even a column name but another Table?

    Hi all

    I have the problem to create a tableview with the same column name, but in the other table.

    Table I: -.

    Table - PAC051MPROFORMA

    Column - MNR, visitid

    Table - PAC051TPROFORMA
    Column - MNR, visitid

    Table - PAC052MTRANSBILL
    Column - MNR, visitid

    Then, I want to create a table for this table. It comes to my SQL

    Pacviewproforma CREATE VIEW (MNR, visitid, MNR, visitid, MNR, visitid)

    Like some PAC051MPROFORMA.mrn, PAC051MPROFORMA.visitid, PAC051TPROFORMA.mrn, PAC051TPROFORMA.visitid, PAC052MTRANSBILL.mrn, PAC052MTRANSBILL.visitid

    where

    * (a.PAC051MPROFORMA.mrn = PAC051TPROFORMA.mrn) *.
    and
    * (a.PAC051TPROFORMA.mrn = PAC052TRANSBILL.mrn) *.

    SQL return this error ORA-00957 =: duplicate column name

    Can I change this SQL for

    Pacviewproforma CREATE VIEW (MNR, visitid)

    Like some PAC051MPROFORMA.mrn, PAC051MPROFORMA.visitid, PAC051TPROFORMA.mrn, PAC051TPROFORMA.visitid, PAC052MTRANSBILL.mrn, PAC052MTRANSBILL.visitid

    where

    * (a.PAC051MPROFORMA.mrn = PAC051TPROFORMA.mrn) *.
    and
    * (a.PAC051TPROFORMA.mrn = PAC052TRANSBILL.mrn) *.
    This time this error return = ORA-01730: number of column names specified invalid

    What should I do?

    Thank you...

    Hello

    SQL> CREATE VIEW pacviewproforma (mrn,visitid,mrn,visitid,mrn,visitid)
      2  As Select
      3  PAC051MPROFORMA.mrn,
      4  PAC051MPROFORMA.visitid,
      5  PAC051TPROFORMA.mrn,
      6  PAC051TPROFORMA.visitid,
      7  PAC052MTRANSBILL.mrn,
      8  PAC052MTRANSBILL.visitid
      9  from PAC051MPROFORMA,PAC051TPROFORMA,PAC052MTRANSBILL
     10  where
     11  (PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn)
     12  and
     13  (PAC051TPROFORMA.mrn=PAC052MTRANSBILL.mrn);
    CREATE VIEW pacviewproforma (mrn,visitid,mrn,visitid,mrn,visitid)
                                             *
    ERROR at line 1:
    ORA-00957: duplicate column name
    

    Please give different names to each column.

    Something like that...

    SQL> CREATE OR REPLACE VIEW pacviewproforma (MPROFORMA_mrn,MPROFORMA_visitid,TPROFORMA_mrn,TPROFORMA
    _visitid,MTRANSBILL_mrn,MTRANSBILL_visitid)
      2  As Select
      3  PAC051MPROFORMA.mrn,
      4  PAC051MPROFORMA.visitid,
      5  PAC051TPROFORMA.mrn,
      6  PAC051TPROFORMA.visitid,
      7  PAC052MTRANSBILL.mrn,
      8  PAC052MTRANSBILL.visitid
      9  from PAC051MPROFORMA,PAC051TPROFORMA,PAC052MTRANSBILL
     10  where
     11  (PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn)
     12  and
     13  (PAC051TPROFORMA.mrn=PAC052MTRANSBILL.mrn);
    
    View created.
    
    SQL> DESC  pacviewproforma;
     Name                                      Null?    Type
     ----------------------------------------- -------- ----------------------------
     MPROFORMA_MRN                                      NUMBER
     MPROFORMA_VISITID                                  NUMBER
     TPROFORMA_MRN                                      NUMBER
     TPROFORMA_VISITID                                  NUMBER
     MTRANSBILL_MRN                                     NUMBER
     MTRANSBILL_VISITID                                 NUMBER
    

    ORA-01730: number of column names specified invalid

    The list of the nmae column you specified for the CREATE VIEW must correspond with the list of SELECTION in the view.

    Twinkle

Maybe you are looking for

  • Min array index problem.

    Hello everyone, I want to take a trigger pulse data that only my trigger pulse takes the form of square wave. For that I am taking the min and max markings table. When I use this pellate, it does not index table min correctly, it gives the worng numb

  • Cannot open my pdf files today. no problem before

    When I try to open my pdf files, they open but have become gibberish.

  • Place a digital copy from my computer to windows media player

    I loaded a digital copy disc to my computer and now I am trying to place it in windows media so I can load it on a coby mp826 - 4 g mp3 for my daughter but I don't have a chance

  • Error of reconstruction recovery environment

    I completely formatted and installed Windows 8.1 and upgraded to Windows 10. And today, I have installed Dell backup and restore. After I clicked on the system backup in the backup menu it says that "We have detected that your recovery environment is

  • HTML5 Webworks: config.xml editor?

    Hi, I work a request for Playbook (HTML5 - BlackBerry WebWorks SDK for Tablet 2.2.0.5) using eclipse IDE (basically change the code HTML and JS files).