How to create view in oracle?

Hi sir,
i have a view created in sql server that i converted in sql developer through translation scratch editor.
but when i am executing this it's not getting executed showing error insufficient privilege.
here is my view below.
CREATE OR REPLACE VIEW vwEmpMain
AS
SELECT Employee.Emp_ID ,
Employee.Emp_FirstName || ' ' || Employee.Emp_LastName Emp_Name ,
Comp_Master.Comp_Name ,
Dept_Master.Dept_Name ,
Desig_Master.Desig_Name ,
Category_Master.Cat_Name ,
Dept_Master.Dept_Desc ,
Category_Master.Cat_Desc ,
Desig_Master.Desig_Desc ,
Comp_Master.Parent_ID HiredBy ,
Employee.Card_ID ,
Employee.Comp_ID ,
Employee.Dept_Code ,
Employee.Cat_Code ,
Employee.Desig_Code ,
Employee.ADDRESS ,
Employee.Phone ,
Comp_Master.STATUS Comp_Status ,
Employee.DOJ Date_Of_Join
FROM Comp_Master
RIGHT JOIN Employee
ON Comp_Master.Comp_ID = Employee.Comp_ID
LEFT JOIN Desig_Master
ON Employee.Desig_Code = Desig_Master.Desig_Code
LEFT JOIN Dept_Master
ON Employee.Dept_Code = Dept_Master.Dept_Code
LEFT JOIN Category_Master
ON Employee.Cat_Code = Category_Master.Cat_Code;
could you check that.
thanks

Whenever you post provide your 4 digit Oracle version (result of SELECT * FROM V$VERSION).
>
when i am executing this it's not getting executed showing error insufficient privilege.
>
Always provide the exact error code and message for questions like this.
That error means the user does not have the CREATE VIEW or CREATE ANY VIEW privilege.
The solution is to grant the user CREATE VIEW, for creating views in their own schema, or CREATE ANY VIEW to create views on objects in other schemas.
As SYS 'REVOKE CREATE VIEW FROM SCOTT'. Then as SCOTT
>
create or replace view a_view as select * from emp;
ORA-01031: insufficient privileges
>
It is a different error when the user does not have SELECT privilege on the underlying table or view
As SYS 'GRANT CREATE VIEW TO SCOTT'. Then as SCOTT
>
create or replace view a_view as select * from hr.employees
ORA-00942: table or view does not exist
>
Same if the object does not exist
>
create or replace view a_view as select * from no_such_table
ORA-00942: table or view does not exist
>
But if the table does exist
>
create or replace view a_view as select * from emp;

Similar Messages

  • How to create view for xmltype table in oracle

    hi:
    Can some one help me how to create view for xmltype table in oracle?
    XMLType do not have column
    Sem

    Thank you !!
    I read it and become very hard to implement what I want to do.
    Can you give me example please?
    My main goal to create view for xmltype table is to XQuery the XML data?
    Do you have any other suggestion?
    Please help
    Ali_2

  • How to create a new Oracle OSB project automaticaly with script without IDE

    Hello,
    I want to create automatically an "Oracle service bus project" and an "Oracle service bus configuration project" with scripts (ANT or Maven or ...) without using IDE, without using workshop or Eclipse. I want to create automatically (ANT or Maven) just a skeleton of an OSB project witch i can use after in workshop.
    I want to create 1 "Oracle service bus configuration project" with many "Oracle service bus project" automatically (ANT or Maven or scripts) witch i can use after in workshop. How to create a new Oracle OSB project automaticaly with script without IDE ? How can i do this ?
    I'm using Oracle service bus 10.3.1
    Thank you for your help.

    Thank you for your response,
    I do not want to just create the services (proxy services and business services) but I want to create a template for 40 OSB project with the same scripts ANT/Maven.
    Template="Oracle service bus configuration project" + "Oracle service bus project" + services of 40 OSB projects
    The goal is that I have more than 40 projects to create and just the name of the projects that changes (when I say the name of the project ie the name of the OSB project, the name of proxy services and the name of business services ).
    So I want to give my script (ANT/Maven) the name of 40 OSB project and the script must generate the skeleton of the 40 projects at once time and after generation of skeleton of the 40 project, I will import them in the workshop to add manually mapping and routing and other things that differs from one project to another.
    So i want to generate automatically a skeletons of 40 OSB projects using a script (ANT / Maven) and I give to the script juste the names of the 40 projects.
    I want to create a "Oracle service bus configuration project" and "Oracle service bus project" automatically of 40 OSB projects (ANT or Maven or scripts) witch i can use after in workshop.
    I want to create one 'template' of all 40 projects in the same time, with the same directory structure (Transforlation, Business services, proxy services, WSDL .....) and all 40 project have the same transport, just the names of projects and services witch changes and i can give to the script all names of projects and services and i can give also all WSDL.
    Regards,
    Tarik

  • How to create snapshot on Oracle VM 3.1.1

    Dear All,
    Any one know about how to create snapshot in Oracle VM 3.1.1? Where we can find it in Oracle VM 3.1.1?
    Please kindly shared experience about this.
    Thanks and regards,
    Vandy

    Thank you very much for your help.
    Now I am using Sun Storage 6180 Array direct attach (Fiber Chanel) with 2 Sun Fire X4100M2 Servers as Cluster, I don't know whether this storage can create snapshot for this or not? How about Oracle VM Manager can help for this?
    It seem more difficult than VMware vSphere, if Oracle can create a option for this is very good.
    Thanks and regards,
    Vandy

  • How to create scheduler sql oracle developer

    Hi
    how to create How to create scheduler sql oracle developer?

    Hi
    finally i refer below link its usefull
    ORACLE-BASE - SQL Developer 3.1 Scheduler (DBMS_SCHEDULER) Support

  • How to CREATE VIEW to merge two tables each of which has CLOB-typed column

    I failed in creating a view to merge two tables that have CLOB-type column each.
    The details are:
    Database: Oracle 9i (9.2.0)
    Two tables "test" and "test_bak", each of which has the following structure:
    ID Number(10, 0)
    DUMMY VARCHAR2(20)
    DUMMYCLOB CLOB
    The following operation fails:
    create view dummyview (id, dummy, dummyclob) as
    select id, dummy, dummyclob from test
    union
    select id, dummy, dummyclob from test_bak;
    I was announced:
    select test.id, test.dummy, test.dummyclob
    ERROR in line 2:
    ORA-00932: inconsistent data type: required - , but CLOB presented.
    But if creating views from only ONE table with CLOB-type columns, or from two tables WITHOUT CLOB-typed columns, the creation will succeed. The following 1) and 2) will succeed, both:
    1) one table, with CLOB-typed column
    create view dummyview (id, dummy, dummyclob) as
    select id, dummy, dummyclob from test;
    2) two tables, without CLOB-typed columns
    create view dummyview (id, dummy) as
    select id, dummy from test
    union
    select id, dummy from test_bak;
    I want to merge the two tables all, with complete columns, how to write the CREATE VIEW SQL statement?
    many thanks in advance

    Dong Wenyu,
    No.
    But you could do this:
    SELECT source.*, nvl (tab1.clob_column, tab2.clob_column)
    FROM your_table1 tab1, your_table2 tab2, (
    SELECT primary_key, ...
    FROM your_table1
    UNION
    SELECT primary_key, ...
    FROM your_table2
    ) source
    WHERE source.primary_key = tab1.id (+)
    AND source.primary_key = tab2.id (+)
    In other words, do the set operation (UNION (ALL)/INTERSECT/MINUS) on just the PK columns before pulling in the LOB columns.
    d.

  • How to create clustering on oracle application server on windows

    hi,
    i want to know how can i create clustering on oracle application server on windows machine.
    regards

    I think that you need to configure Web cache for this as a frontend, and two or more servers behind it.
    Try to read :
    Metalink DOC ID 312834.1
    http://www.oracle.com/technetwork/developer-tools/forms/documentation/advancedformsconf-128186.pdf
    Edited by: Marcos_Pawloski on 15/12/2010 00:02

  • How to create view like Facebook - Profile, Wall portion in my iphone apps

    Hi,
    I have to create same that type of view for my application. my requirement like that i have one question and user can give answer of my question with unlimited number of lines. SO obviously we have to use UITableView. Now problem is that how can i decide my table row height and if there is two lines then answer portion should be small and if answer portion is big then it should be large with unlimited answers.
    Does anyone know how to create this type of table view.
    Thanks.
    Message was edited by: crazyiphony

    Hi,
    i suggest reading some documentation. First you nedd to "tell" the tableView that it's rows are of different height. So you need to implement "tableView:heightForRowAtIndexPath:"
    To calculate the height needed for a specific text you can use one of the "sizeWithFont" methods of NSString class. (http://developer.apple.com/iphone/library/documentation/UIKit/Reference/NSStringUIKitAdditions/Reference/Reference.html)

  • How to create table in Oracle 9i of name USER

    To whom so ever forum member,
    Please help me for creating table in Oracle 9i with the table name USER, though i know that it's reserve word for the Oracle DB
    Please give me the query if any for the same.
    Thanks in advance for timely help.
    Kiran.

    CREATE USER user-name IDENTIFY BY password
    user-name
    The name of the user to be created. The name is an identifier with a maximum of 30 characters. Note that if support for delimited identifiers is on and the user name begins with an underscore, you must place the user name in quotation marks.
    various identifiers possible
    simple-identifier ::= identifier-start { identifier-part }
    identifier-start ::= letter | % | _
    identifier-part ::= letter | number | _ | @ | # | $
    delimited-identifier ::= " delimited-identifier-part { delimited-identifier-part } "
    delimited-identifier-part ::= non-double-quote-character | double-quote-symbol
    double-quote-symbol ::= ""
    An identifier cannot be a SQL reserved word.
    An identifier may be either a simple identifier or a delimited identifier.
    password
    The password of the user to be created.
    the reserved words are:
    %AFTERHAVING | %ALPHAUP | %ALTER | %ALTER_USER | %BEGTRANS |
    %CHECKPRIV | %CREATE_ROLE | %CREATE_USER | %DBUGFULL |
    %DELDATA | %DESCRIPTION | %DROP_ANY_ROLE | %DROP_USER |
    %EXACT | %EXTERNAL | %FILE | %FOREACH | %FULL |
    %GRANT_ANY_PRIVILEGE | %GRANT_ANY_ROLE | %INORDER |
    %INTERNAL | %INTEXT | %INTRANS | %INTRANSACTION | %MCODE |
    %NOCHECK | %NODELDATA | %NOINDEX | %NOLOCK | %NOTRIGGER |
    %NUMROWS | %ODBCOUT | %ROUTINE | %ROWCOUNT | %STARTSWITH |
    %STRING | %THRESHOLD | %UPPER |
    ABSOLUTE | ACTION | ADD | ALL | ALLOCATE | ALTER | AND |
    ANY | ARE | AS | ASC | ASSERTION | AT | AUTHORIZATION | AVG |
    BEGIN | BETWEEN | BIT | BIT_LENGTH | BOTH | BY | CASCADE |
    CASE | CAST | CATALOG | CHAR | CHARACTER | CHARACTER_LENGTH |
    CHAR_LENGTH | CHECK | CLOSE | COALESCE | COBOL | COLLATE |
    COLLATION | COLUMN | COMMIT | CONNECT | CONNECTION |
    CONSTRAINT | CONSTRAINTS | CONTINUE | CONVERT |
    CORRESPONDING | COUNT | CREATE | CROSS | CURRENT |
    CURRENT_DATE | CURRENT_TIME | CURRENT_TIMESTAMP |
    CURRENT_USER | CURSOR | DATE | DAY | DEALLOCATE | DEC |
    DECIMAL | DECLARE | DEFAULT | DEFERRABLE | DEFERRED |
    DELETE | DESC | DESCRIBE | DESCRIPTOR | DIAGNOSTICS |
    DISCONNECT | DISTINCT | DOMAIN | DOUBLE | DROP | ELSE |
    END | ENDEXEC | ESCAPE | EXCEPT | EXCEPTION | EXEC |
    EXECUTE | EXISTS | EXTERNAL | EXTRACT | FALSE | FETCH |
    FILE | FIRST | FLOAT | FOR | FOREIGN | FORTRAN | FOUND |
    FROM | FULL | GET | GLOBAL | GO | GOTO | GRANT | GROUP |
    HAVING | HOUR | IDENTITY | IMMEDIATE | IN | INDICATOR |
    INITIALLY | INNER | INPUT | INSENSITIVE | INSERT | INT |
    INTEGER | INTERSECT | INTERVAL | INTO | IS | ISOLATION |
    JOIN | KEY | LANGUAGE | LAST | LEADING | LEFT | LEVEL |
    LIKE | LOCAL | LOWER | MATCH | MAX | MIN | MINUTE |
    MODULE | MONTH | NAMES | NATIONAL | NATURAL | NCHAR |
    NEXT | NO | NOT | NULL | NULLIF | NUMERIC | OCTET_LENGTH |
    OF | ON | ONLY | OPEN | OPTION | OR | ORDER | OUTER |
    OUTPUT | OVERLAPS | PAD | PARTIAL | PASCAL | PLI |
    POSITION | PRECISION | PREPARE | PRESERVE | PRIMARY |
    PRIOR | PRIVILEGES | PROCEDURE | PUBLIC | READ | REAL |
    REFERENCES | RELATIVE | RESTRICT | REVOKE | RIGHT | ROLE |
    ROLLBACK | ROWS | SCHEMA | SCROLL | SECOND | SECTION |
    SELECT | SESSION_USER | SET | SIZE | SMALLINT | SOME |
    SPACE | SQL | SQLCODE | SQLERROR | SQLSTATE | SUBSTRING |
    SUM | SYSTEM_USER | TABLE | TEMPORARY | THEN | TIME |
    TIMESTAMP | TIMEZONE_HOUR | TIMEZONE_MINUTE | TO |
    TRAILING | TRANSACTION | TRANSLATE | TRANSLATION | TRIM |
    TRUE | UNION | UNIQUE | UNKNOWN | UPDATE | UPPER | USAGE |
    <br>
    USER |
    <br>
    USING | VALUE | VALUES | VARCHAR | VARYING | VIEW |
    WHEN | WHENEVER | WHERE | WITH | WORK | WRITE | YEAR |
    ZONE
    hope it helps ...
    roli

  • How to create menus in oracle forms6i?

    hello all,
    I want to create menu option in oracle forms6i..Is it possible? then how to create menus in a frame? pls help me..
    USER MANAGEMENT-------------->this is main menu.under this i want following
    --------->1.ADD USER
    ---------->2.EDIT USER
    ----------->3.DROP USER

    Hi Balraj
    Try to read this & implement it
    http://dbaforums.org/oracle/index.php?showtopic=2031
    u have also menu FREE sample as Demo Forms6i pls down load
    http://www.oracle.com/technology/sample_code/products/forms/6idemos.html
    Or download it directly as in this Thread Francois posted Directly...
    Forms6 : default menus menudef.mmb and menudefs.mmb
    Regards,
    Abdetu...
    Edited by: Abdetu on Jan 23, 2011 11:31 PM

  • How to create URL in Oracle Application Server ?

    Hello,
    I would like to know how to create a URL in Oracle Application server (LINUX) so that our application can be invoked from each and every machine in our
    local hosting.I expect a quick reply.

    You question is not so clear. Basically, after installing infrastructure and middle-tier instances, you can simple run http://localhost:port/appication from any web browser.
    If not, what is your requirements?
    Jaffar

  • How to create form in oracle application express

    hi friends,
    i am a new person in oracle application express software.
    i just want to ask that can we use oracle application express as a front end for oracle 10g database???
    if yes then can any one tell me that how to create form in it?
    is there any connection string to connect that form with oracle 10g.
    Please do me reply soon thanks

    To this forum... please:
    Oracle Application Express (APEX)
    Greetings

  • How to create JNDI for Oracle Apps Adapter

    I have created a data-source(jdbc/testds) and connection pool which connects to apps schema in Weblogic console.
    Then i go to Deployments-> Oracle Apps Adapter -> Configuration -> Outbound Connection Pools. In the Outbound Connection Pools table i expand "javax.resource.cci.ConnectionFactory" and then click New and select "javax.resource.cci.ConnectionFactory", click Next and give JNDI name "eis/apps/testds"
    But when i try to execute my BPEL process that has a reference eis/apps/testds it throws a JCA binding error. Can someone please guide me on how to create a Apps adapter connection. Also i would like to know how to refresh the connection pool(we used to have this facility in Oracle Application Server).
    Thanks,

    Can you once check the OA adapter check box in deployments and click update?

  • How to create dblink between oracle 10G and mysql

    I want to create dblink between oracle 10G and mysql
    I create it in ECC6.0 using DBCO transaction tcode,which database type can choose?Microsoft sql server?Because there have no mysql item.
    I choosed MSS  so that I can test it, but it failed,there is an error that 'ORA-12569:TNS:packet checksun failure'.
    I configured the oracle tnsnames.ora file like this:
         CW.WORLD =
               (DESCRIPTION =
                    (ADDRESS_LIST =
                          (ADDRESS =
                                  (COMMUNITY = SAP,WORLD)
                                  (PROTOCOL = TCP)
                                  (HOST = XX.XX.XX.XX)
                                  (PORT = XXXX)
                   (CONNECT_DATA =
                        (SID = XXX )
                   (HS = ok )
    When I tnsping CW,it will fail,like this " TNS-12569:TNS:packet checksum failure"
    How can I do.

    I want to know if this possible?

  • How to create view that has an update statement

    Tools: MS Management Studio SQL 2008 R2
    Code:
    Create View as Mocha
    UPDATE dbo.Cola
    SET Login_ID = Replace(PE15,RTRIM(Cast(Login_ID),'')
    UPDATE dbo.cola
    SET P4 = NullIf(P4,'')
    I would like to create a database object "View" to hand it over to a user and run the script. How I would create a a view that would accept an update statement. Are any work around to accomplish this goal

    Not quite sure what you want to achieve.
    However, if your view displays rows from a single table and each row relates to exactly one row in the source table (no aggregates, no join, no transformation) then you can update it.  The update will be executed on the table it refers to.
    If you view is more complex, contains joins, aggregates and such, you can create a trigger on it to update the base table(s).
    The conditions for a view to be updatable are a little more complex then what I wrote but you can find it here under "updatable view":
    http://msdn.microsoft.com/en-CA/library/ms187956.aspx
    In the end, you would have a view which displays rows and can be updated.
    If all you want is to modify rows without viewing them then HuaMin Chen's solution is the one for you, create a stored procedure instead.

Maybe you are looking for

  • Trouble opening CS2 file in CS4 - any suggestions?

    Hello, We recently upgraded to CS4 and have been able to open most documents. I have one file that freezes while converting data and upon trying multiple times, it says InDesign has stopped working. We have sent the file to our printer to troubleshoo

  • Photoshop wont open .mp4 video file

    When i try to open an mp4 video photoshop prompts me that i need a quicktime version 7.1 or higher , i have 7.7.1 I have photoshop CS5 extended which as far as i know should be able to open .mp4 files. Any ideas? This is what i get

  • Message Check Box, Unchecked Value

    Hi, I want to set this message checkbox item to <null> so I didn't put any value in the Unchecked Value. However, when I returned to the self-service page, and unchecked the checkbox, I'm getting 'N' instead of <null>. How do I set the Unchecked valu

  • Accordion Widget on Tablet or Phone

    Here is a problem or flaw.  If you deploy an Accordion Widget on an phone or table MUSE site, and a user opens one of the Accordion tabs and scrolls to the BOTTOM of its contents.  Then if the user opens the next Accordion tab, that one automatically

  • Flicker on Dragon Sensor R3Ds - pulldown bug?

    Since upgrading our RED camera to the Dragon sensor, we've been noticing a strange bug.  R3Ds that were shot at 23.98 fps that are put on a 29.97 fps sequence (or exported from a 23.98 fps sequence to a 29.97 fps file) are having something wonky occu