Cannot create view with parameter bindings

Hi, I'm trying to create this view in SQLPlus:
SELECT order_no, SUM(cut_qty),
SUM(received_qty)
FROM (
SELECT order_no, cut.dated, DECODE(cut.bimetallic, 'F', cut.quantity, cut.quantity/2) cut_qty,0 AS received_qty
FROM cut_shop_orders_dated cut
WHERE cut.dated BETWEEN TO_DATE('&date1','DD/MM/YYYY') AND TO_DATE('&date2','DD/MM/YYYY')
UNION
(SELECT order_no, rec.dated, 0, rec.quantity
FROM received_shop_orders_dated rec
WHERE rec.dated BETWEEN TO_DATE('&date3','DD/MM/YYYY') AND TO_DATE('&date4','DD/MM/YYYY')))
GROUP BY order_no
The problem is that sqlplus asks me for the parameter values and then creates it with these values as literal dates in the to_date function, those not asking for parameter values in runtime.
How can I create it using parameters with no values at design time?
Thanks.
Leandro.

if you want something like :
select * from emp $where_clause;
you can write a procedure with parameter and run it as dynamic sql for example
create or replace procedure pr1 ( p_where   varchar2) is
begin
  execute immediate 'create or replace view view_name as select * from emp '|| p_where;
end pr1;
/then run it on sql*plus
SQL> exec pr1('where deptno = 10');
make sure you give yourself "create any view" rights explicitly.
HTH
Ghulam

Similar Messages

  • Is it possible to create a spatial view with paramete?

    Is it possible to create a view with parameter like following:
    SELECT GEOM FROM INTERSTATES WHERE MDSYS.SDO_FILTER(GEOM, MDSYS.SDO_GEOMETRY(2003, 8307, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 3), MDSYS.SDO_ORDINATE_ARRAY(?, ?, ?, ?)), 'querytype=WINDOW') = 'TRUE'
    so that I can specify ???? at run time.
    If not, is there a way to create a view that perform variable window query?

    You may want to look at application contexts, that way you may have code something like this:
    create or replace context gis_ctx using gis_params ;
    create or replace package gis_params
    as
    procedure set_bounds( minx in number, miny in number, maxx in number,maxy in number );
    end;
    create or replace package body gis_params
    as
    procedure set_bounds( minx in number, miny in number, maxx in number,maxy in number )
    is
    begin
    dbms_session.set_context( 'gis_ctx', 'minx', minx);
    dbms_session.set_context( 'gis_ctx', 'miny', miny);
    dbms_session.set_context( 'gis_ctx', 'maxx', maxx);
    dbms_session.set_context( 'gis_ctx', 'maxy', maxy);
    end ;
    end ;
    To use this method you´ll have to execute
    gis_params.set_bounds(-3,40,-2.9,40.1) ;
    before doing the select.
    SELECT GEOM
    FROM INTERSTATES
    WHERE MDSYS.SDO_FILTER(GEOM,
    MDSYS.SDO_GEOMETRY(2003,
    8307,
    NULL,
    MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 3),
    MDSYS.SDO_ORDINATE_ARRAY(sys_context ('gis_ctx', 'minx'),
    sys_context ('gis_ctx', 'miny'),
    sys_context ('gis_ctx', 'maxx'),
    sys_context ('gis_ctx', 'maxy'))),
    'querytype=WINDOW') = 'TRUE' ;
    I f you are in a web environment, read about GLOBAL CONTEXT ACCESSED GLOBALLY .
    Regards, Nico.

  • Makes it possible to create view with parameters

    makes it possibel to create view with paramater, example
    create or replace view v_test(segment varchar2)
        select * from ref_user where segment = segmentThanks

    thanks..
    select count(distinct substr(a.svm_id,1,10)) jumlah " +
       " from daily_distribution_pop a, ref_toko b " +
       " where " +
       " substr(a.svm_id,1,10)=b.id and b.segment_type = 'A' and enable_flag='Y' " +
       " and a.tgl_visit between to_date('" + fromStartDate + "', 'dd/MM/yyyy') and to_date('" + fromEndDate + "', 'dd/MM/yyyy')
         and " + whereA + "= '" + whereB + "' " +
       " and substr(a.pom_id,1,2) = 'DP' and (a.qty_instore <> 0 or a.qty_delivered <> 0) ";
    {code}
    where fromStartDate,  fromEndDate, whereA, whereB  is variable parameter from asp.net.
    how to i can implement with view                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Create View  with Force and No Force

    Can Anyone Tell me how to create view with force and no force i have very little idea about this

    This is the syntax.
    CREATE [OR REPLACE] FORCE VIEW view
    [(alias[, alias]...)]
    AS subquery
    [WITH CHECK OPTION [CONSTRAINT constraint]]
    [WITH READ ONLY [CONSTRAINT constraint]];You can see interesting threads about this topic here.
    Re: Creating view forcibly
    Creating View forcefully
    Cheers
    Sarma.

  • ERROR: Cannot create authcontext with null org-Naming query failed  code:21

    I use OpenSSO Enterprise 8.0 Update 1 Patch1 Build 6.1(2009-June-9 12:56)
    I try to evaluate the Apache 2.2 web agent.
    It's been installed without errors, and both the OpenSSO and Apache server restarted.
    The agent profile's been created. Also, I use the default (OpenDS) configuration repository
    for OpenSSO, but an external (DSEE) user data directory.
    I think I did all the required steps with regards to both directories, since I don't see any error
    in the LDAP logs, each entry seems to be found as expected, the BIND operations are all
    successfull.
    Also, I use a sub-realm rather than the default top realm, and thus, I've modified the agent configuration
    (in the agent profile) so that the login URL is now ... /UI/Login?realm=myrealm
    When I try to access the Apache homepage, I get an error 500. The most recent OpenSSO server log file
    (...../opensso/debug/Authentication) contains the following message:
    ERROR: Cannot create authcontext with null org
    The most recent agent log file (....../apache22_agent/Agent_001/logs/debug/amAgent) has the following error:
    2009-07-07 17:08:11.992 Error 10513:80149a50 PolicyEngine: am_policy_evaluate: InternalException in Service::update_policy with error message:Naming query failed. and code:21
    I don't know what else I can do to debug this problem and find a solution. Any idea ?

    Thank you Shubba,
    With all available log details enabled, I now have the following messages on the agent side:
    2009-07-09 10:14:51.731MaxDebug 5613:80149a50 all: No value specified for key com.sun.identity.agents.config.profile.attribute.mapping, using default value .
    2009-07-09 10:14:51.731 Debug 5613:80149a50 NamingService: BaseService::doRequest(): Using server: http://portable.antibes.net:8080/opensso/namingservice.
    2009-07-09 10:14:51.731MaxDebug 5613:80149a50 NamingService:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <RequestSet vers="1.0" svcid="com.iplanet.am.naming" reqid="10">
    <Request><![CDATA[                                                                                                                      
      <NamingRequest vers="3.0" reqid="2" sessid=""AQIC5wM2LY4SfcyaGFgc5h9Y7/kpf4f//ml82oVfNlbWxQE=@AAJTSQACMDE=#"">                             <GetNamingProfile>                                                                                                                         </GetNamingProfile>                                                                                                                        </NamingRequest>]]> </Request>
    </RequestSet>
    2009-07-09 10:14:51.712MaxDebug 5613:80149a50 NamingService: BaseService::sendRequest Request line: POST /opensso/namingservice HTTP/1.0
    2009-07-09 10:14:51.712 Debug 5613:80149a50 NamingService: BaseService::sendRequest Cookie and Headers =Host: portable.antibes.net
    2009-07-09 10:14:51.712 Debug 5613:80149a50 NamingService: BaseService::sendRequest Content-Length =Content-Length: 334
    2009-07-09 10:14:51.712 Debug 5613:80149a50 NamingService: BaseService::sendRequest Header Suffix =Accept: text/xml
    Content-Type: text/xml; charset=UTF-8
    2009-07-09 10:14:51.712MaxDebug 5613:80149a50 NamingService: BaseService::sendRequest(): Total chunks: 7.
    2009-07-09 10:14:51.712MaxDebug 5613:80149a50 NamingService: BaseService::sendRequest(): Sent 7 chunks.
    2009-07-09 10:14:51.728 Debug 5613:80149a50 NamingService: HTTP Status = 500 (Internal Server Error)
    2009-07-09 10:14:51.729MaxDebug 5613:80149a50 NamingService: Http::Response::readAndParse(): Reading headers.
    2009-07-09 10:14:51.729MaxDebug 5613:80149a50 NamingService: Server: Apache-Coyote/1.1
    2009-07-09 10:14:51.729MaxDebug 5613:80149a50 NamingService: Content-Type: text/html;charset=utf-8
    2009-07-09 10:14:51.729MaxDebug 5613:80149a50 NamingService: Date: Thu, 09 Jul 2009 08:14:51 GMT
    2009-07-09 10:14:51.729MaxDebug 5613:80149a50 NamingService: Connection: close
    2009-07-09 10:14:51.729MaxDebug 5613:80149a50 NamingService: Http::Response::readAndParse(): Reading body content of length: 13830487939496281954
    2009-07-09 10:14:51.729MaxDebug 5613:80149a50 all: Connection::waitForReply(): returns with status success.
    2009-07-09 10:14:51.729MaxDebug 5613:80149a50 NamingService: Http::Response::readAndParse(): Completed processing the response with status: success
    2009-07-09 10:14:51.729MaxDebug 5613:80149a50 NamingService: <html><head><title>Apache Tomcat/6.0.18 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The server encountered an internal error () that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>javax.servlet.ServletException: AMSetupFilter.doFilter
    com.sun.identity.setup.AMSetupFilter.doFilter(AMSetupFilter.java:117)
    </pre></p><p><b>root cause</b> <pre>java.lang.NullPointerException
    com.iplanet.services.naming.service.NamingService.processRequest(NamingService.java:361)
    com.iplanet.services.naming.service.NamingService.process(NamingService.java:352)
    com.iplanet.services.comm.server.PLLRequestServlet.handleRequest(PLLRequestServlet.java:180)
    com.iplanet.services.comm.server.PLLRequestServlet.doPost(PLLRequestServlet.java:134)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    com.sun.identity.setup.AMSetupFilter.doFilter(AMSetupFilter.java:91)
    </pre></p><p><b>note</b> <u>The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/6.0.18</h3></body></html>
    2009-07-09 10:14:51.729 Warning 5613:80149a50 NamingService: BaseService::doHttpPost() failed, HTTP error = 500
    2009-07-09 10:14:51.729 Debug 5613:80149a50 NamingService: NamingService()::getProfile() returning with error code HTTP error.
    2009-07-09 10:14:51.729 Error 5613:80149a50 PolicyEngine: am_policy_evaluate: InternalException in Service::update_policy with error message:Naming query failed. and code:21
    In my Tomcat server (OpenSSO server web container), I have the following errors:
    Jul 9, 2009 10:12:35 AM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 22746 ms
    [Fatal Error] :2:46: Element type "NamingRequest" must be followed by either attribute specifications, ">" or "/>".
    java.lang.NullPointerException
    at com.iplanet.services.naming.service.NamingService.processRequest(NamingService.java:361)
    at com.iplanet.services.naming.service.NamingService.process(NamingService.java:352)
    at com.iplanet.services.comm.server.PLLRequestServlet.handleRequest(PLLRequestServlet.java:180)
    at ...
    It seems like the problem comes from the couple of closing square brackets in the NamingRequest tag:
    </NamingRequest>]]>
    I don't know where it comes from, so if you've an idea I'd enjoy .
    Cheers,

  • Is it possible to create views with parameters ?

    Hi,
    As MS-Access, is it possible to create views with parameters ?
    Ms-Access syntax : parameters [a] text; select * from table where code = [a]
    If yes, can you give samples ?
    Regards
    Pascal

    I suggest you you write a stored procedure that returns a recordset in oracle. Then execute the stored procedure and loop through the record set.
    Look in in MS Knowledgebase searching on ADO Stored Proceedures for the VB/C++/VBS .. code.
    Look in in Oracle PL/SQL guide for the Stored Proceedure code.

  • How I can create view with parameters?

    I have very big query (2000 rows) and 2 parameters.
    How I can create view with parameters?

    If I use this small part of my query than I have error :
    java.lang.NullPointerException
         at oracle.javatools.db.ora.OracleSQLQueryBuilder.buildQuery(OracleSQLQueryBuilder.java:199)
         at oracle.javatools.db.ora.OracleSQLQueryBuilder.buildQuery(OracleSQLQueryBuilder.java:147)
    What does it means?
    select
    ' Payroll ' as Revenue
    , t.umonth, nvl(p.hmy, 0), nvl(t.sMTD, 0), nvl(a.inormalbalance, 0), nvl(T.sbudget, 0), nvl(a.scode, 0)
    from
    acct a, total t, property p, param par
    where
    nvl(t.hacct, 0) = nvl(a.hmy, 0)
    and nvl(par.hretain, 0) <> nvl(a.hmy, 0)
    and nvl(t.iBook, 0) = 0
    and nvl(a.iacctType, 0) = 0 /*Regular accts*/
    and nvl(t.hppty, 0) = nvl(p.hmy, 0)
    and ( nvl(a.scode, 0) between 60000 and 6009000 )
    union all ---------------------------------------------------------------------------------------------------------------------------------
    select
    ' Payroll Taxes '
    , t.umonth, nvl(p.hmy, 0), nvl(t.sMTD, 0), nvl(a.inormalbalance, 0), nvl(T.sbudget, 0), nvl(a.scode, 0)
    from
    acct a, total t, property p, param par
    where
    nvl(t.hacct, 0) = nvl(a.hmy, 0)
    and nvl(par.hretain, 0) <> nvl(a.hmy, 0)
    and nvl(t.iBook, 0) = 0
    and nvl(a.iacctType, 0) = 0 /*Regular accts*/
    and nvl(t.hppty, 0) = nvl(p.hmy, 0)
    and
    (nvl(a.scode, 0) between 60100 and 60690 )
    union all -------------------------------------------------------------------------------------------------------------------------------
    select
    ' Workers Comp/Disability '
    , t.umonth, nvl(p.hmy, 0), nvl(t.sMTD, 0), nvl(a.inormalbalance, 0), nvl(T.sbudget, 0), nvl(a.scode, 0)
    from
    acct a, total t, property p, param par
    where
    nvl(t.hacct, 0) = nvl(a.hmy, 0)
    and nvl(par.hretain, 0) <> nvl(a.hmy, 0)
    and nvl(t.iBook, 0) = 0
    and nvl(a.iacctType, 0) = 0 /*Regular accts*/
    and nvl(t.hppty, 0) = nvl(p.hmy, 0)
    and
    ( nvl(a.scode, 0) between 61200 and 61260)
    union all -------------------------------------------------------------------------------------------------------------------------------
    select
    ' Pension and Hospitalization '
    , t.umonth, nvl(p.hmy, 0), nvl(t.sMTD, 0), nvl(a.inormalbalance, 0), nvl(T.sbudget, 0), nvl(a.scode, 0)
    from
    acct a, total t, property p, param par
    where
    nvl(t.hacct, 0) = nvl(a.hmy, 0)
    and nvl(par.hretain, 0) <> nvl(a.hmy, 0)
    and nvl(t.iBook, 0) = 0
    and nvl(a.iacctType, 0) = 0 /*Regular accts*/
    and nvl(t.hppty, 0) = nvl(p.hmy, 0)
    and
    ( nvl(a.scode, 0) between 61000 and 61550 )
    union all -------------------------------------------------------------------------------------------------------------------------------
    select
    ' Other Labor Costs '
    , t.umonth, nvl(p.hmy, 0), nvl(t.sMTD, 0), nvl(a.inormalbalance, 0), nvl(T.sbudget, 0), nvl(a.scode, 0)
    from
    acct a, total t, property p, param par
    where
    nvl(t.hacct, 0) = nvl(a.hmy, 0)
    and nvl(par.hretain, 0) <> nvl(a.hmy, 0)
    and nvl(t.iBook, 0) = 0
    and nvl(a.iacctType, 0) = 0 /*Regular accts*/
    and nvl(t.hppty, 0) = nvl(p.hmy, 0)
    and
    ( nvl(a.scode, 0) between 616000 and 616400 )

  • Create a view with parameter

    it's posible create a view with parameters?
    i want to create a view and pass it parameters, in the same way when i create a procedure or function.
    i never have seen it, but i would like to know if that's posible
    thanks

    You cannot create a view with parameters. The only way is to use a stored proc to dynamically create the sql statement. The substitution variable approach does not work. SQL*Plus will prompt for the value of the variable at compile time (i.e. when you create the view) and use the value you provide in the view's query.
    SQL> create or replace view jws_test_v as
      2  select * from jws_test where flag = '&flg'
      3  /
    Enter value for flg: AA
    old   2: select * from jws_test where flag = '&flg'
    new   2: select * from jws_test where flag = 'AA'
    View created.
    SQL> select * from jws_test_v
      2  /
    no rows selected
    SQL> select text from user_views where view_name = 'JWS_TEST_V'
      2  /
    TEXT
    select "LEV1","LEV2","LEV3","LEV4","LEV5","LEV6","FC","FLAG","ONAFT","ONAPT","CU
    PEFT","CUPEPT" from jws_test where flag = 'AA'This makes sense, since substitution vartiables are a sqlplus construct, not a sql or Oracle construct. A view constructed in this way would not be callable from anywhere other than sqlplus.

  • How to create materialized  view with parameter and index ?

    Hi all,
    i am using oracle 11g.
    i want to create  parameter materialized view  with two parameter (STORED_VALUE, LOV_NAME) with  an index .
    i have below view
    CREATE OR REPLACE FORCE VIEW SR_MY_TEST(DISPLAYED_VALUE, STORED_VALUE, LOV_NAME) AS
      SELECT  DISPLAYED_VALUE , LOVVALUE.STORED_VALUE , lovname.lov_name
               FROM (SELECT T.LOV_VALUE_ID,
          T.LOV_ID,
          T.ORG_ENTITY_ID,
          T.STORED_VALUE,
          T.DISPLAYED_VALUE,
          T.ENTERPRISE_ID
         FROM MS_QS_LIST_OF_VALUES_T T) lovvalue, ms_qs_lov_names lovname
              WHERE lovvalue.lov_id = lovname.lov_id
                AND lovvalue.org_entity_id = 1
                and LOVVALUE.ENTERPRISE_ID = 100000
                AND LOVNAME.ENTERPRISE_ID = 100000;
    i want to create index on   STORED_VALUE, LOV_NAME
    Thanks
    Damby

    No.AFAIK, there's nothing called as "parameterized MV".
    Materialized View store data like tables (and not like Views). So, does it make sense when you say - "table with parameters" ?
    Could you please explain your business requirement?
    What is the purpose behind those 2 parameters?

  • How to create a view with parameter?

    who can tell me hwo to create a view with
    parameters just like a cursor?

    Hi,
    This is not possible in Oracle. What u can do is create the view without the where clasue and supply the where clause at runtime.
    Hope this helps...
    Regards,
    Ganesh R

  • Create view With Ref cursor data

    Hi friends,
    I want to create view as follows.
    Example:
    Create or replace v_name
    select job,sal, <funcation>
    from emp;
    Note:- Function not having out parameter.
    Function returning ref cursor values datatype.
    Requirement:-
    I want to create view even function returing ref cursor datatype.
    Please advise how to create view.
    Regards,
    Kishore

    user7284612 wrote:
    Hi friends,
    I want to create view as follows.
    Example:
    Create or replace v_name
    select job,sal, <funcation>
    from emp;
    Note:- Function not having out parameter.
    Function returning ref cursor values datatype.
    Requirement:-
    I want to create view even function returing ref cursor datatype.
    Please advise how to create view.You perhaps are misunderstanding what a ref cursor is. It does not contain data like a table, so cannot be treated as one.
    Take a read of this:
    PL/SQL 101 : Understanding Ref Cursors

  • How to create view with schemabinding on cross datbases(partitioned views)

    Hello Everyone,
    Please help me to sort this issue. I know it is not possible bind the scheman in below example. But is there any solution to solve this issue.
    I've tables like below
    create database D1--First database
    create table dbo.t1(
    id int
    create database D2--Second database
    create table dbo.t2(
    id int
    i want to create a view with the schema binding option on this
    create database D3
    use d3
    create view vw_v1
    with schemabinding
    as
    select id from d1.dbo.t1
    union all
    select id from d2.dbo.t2
    I'm getting this below error
    Msg 4512, Level 16, State 3, Procedure vw_v1, Line 7
    Cannot schema bind view 'vw_v1' because name 'd1.dbo.t12' is invalid for schema binding. Names must be in two-part format and an object cannot reference itself.
    Many thanks
    A-ZSQL

    CREATE VIEW
    SCHEMABINDING
    Binds the view to the schema of the underlying table or tables. When SCHEMABINDING is specified, the base table or tables cannot be modified in a way that would affect the view definition. The view definition itself must first be modified or dropped to remove
    dependencies on the table that is to be modified.
    > When you use SCHEMABINDING,
    the select_statement must include the two-part names (schema.object)
    of tables, views, or user-defined functions that are referenced.
    >
    All referenced objects must be in the same database.
    José Diz     Belo Horizonte, MG - Brasil

  • BC4J, 1012: Cannot create view over 2 different EOs

    Hi,
    a strange thing is happening here:
    I have EOs in different packages. I want to create a join-view over these EOs in one of the packages.
    For some or other reason i cannot have the 2 EOs together. I can add either one of them with any other EO in the project but not these specific 2 EOs.
    Can someone from oracle please tell me what validations are done in the "Create View" - wizard when adding a EO to participate in the view so that i can check the code for irregularities? There is no error message - it just refuses to go to the "selected" window.
    Any ideas PLEASE?
    Thanks.

    Fixing the FK name in the association.xml file, bouncing JDev(since JDev doesn't refresh internal state when a xml file changes externally), fixes the problem.

  • What is the use for CREATING VIEW WITH CHECK OPTION?

    Dear Legends,
    I have a doubt
    What is the use for creating view?
    A: First Data Integrity, Selecting Particular Columns..
    What is the use for creating a view with check option?
    A: As per oracle manual I read that its a referential integrity check through views.
    A: Enforcing constraints at DB level.
    A: using CHECK OPTION we can do INSERTS UPDATES for a view for those columns who have no constraints... is it right??
    A: If we do a INSERT OR UPDATE for columns who have constraints it will show error... is it right???
    Please clear my doubt's Legends
    Lots of Thanks....
    Regards,
    Karthik

    Hi, Karthick,
    karthiksingh_dba wrote:
    ... What is the use for creating view?
    A: First Data Integrity, Selecting Particular Columns..Most views are created and used for convenience. A view is a saved query. If the same operations are often done, then it can be very convenient to code those operations once, in a view, and refer to the view rather than explicitly doing those operations.
    Sometimes, views are created and used for security reasons. For example, you many want to allow some users to see only certain rows or certain columns of a table.
    Views are necessary for INSTEAD OF triggers.
    What is the use for creating a view with check option?
    A: As per oracle manual I read that its a referential integrity check through views.The reason is integrity, not necessarily referential integrity. The CHECK option applies only when DML is done through the view. It prohibits certain changes. For example, if a user can't see certain rows through a view, the CHECK option keeps the user from creating such rows.
    A: Enforcing constraints at DB level.I'm not sure what you mean. Please give an example.
    A: using CHECK OPTION we can do INSERTS UPDATES for a view for those columns who have no constraints... is it right??No. Using CHECK OPTION, you can do some inserts and updates, but not others. The columns involved may or may not have constraints in either case.
    A: If we do a INSERT OR UPDATE for columns who have constraints it will show error... is it right???If you try to violate a constraint, you'll get an error. That happens in views with or without the CHECK OPTION, and also in tables.

  • Error creating view with tables of other user

    I am creating of view containing two tables of another user. I
    am a dba-user.
    The statement looks like this:
    CREATE VIEW TEST
    (SELECT ...
    FROM DWH.TABLE_A A, DWH.TABLE_B B
    WHERE A.ID = B.ID)
    I get an error-message (ORA-00942: Table or view not found).
    When I create the view as user DWH, everything went OK. I don't
    think it has something to do with privileges since I am the dba-
    user.
    How can I create a view using other users tables?

    Hi
    To create view on table of another user you need to have select
    privilege grant directly to you - not to role granted to you. In
    your case you can select tables because you have granted dba
    role and it has select any table prvivilege, but you havent
    directly granted this rights without role.
    Regards

Maybe you are looking for

  • Auto PO - Free Item

    When we are creating SO, an auto PO is being triggered.  However, the free item in SO is not being copied to PO.  Instead it is being saved as a regular item. Any idea how to fix this? Thanks.

  • ESB and BPEL in different servers

    Hi , Is there any performance based advantage when we have BPEL and ESB in different servers ?

  • Safari will open in an unwanted space

    My Safari is set to open in full screen mode. As I launch it from the dock on Desktop 1 it immediately switches the view to Desktop 2, then to the Safari space, which takes the third position among the space (starting from left), looking like the att

  • Microsoft  Patch Issue

    Pl take a look at the Microsoft Patch issue.since we are using flash in a big way.This has an impact on several applications we support. We noticed the problem because we are using non-applicable machines that already have the new patch applied.Any a

  • Java was started but returned exit code=8096

    Perusing the internet found these 4 options as a possible solution but none panned out. Does anyone have any idea why this exit code would be occurring? Occurs using RDz 8.5.1.1. Possible solutions indicated for JVM terminated, exit code = 8096: Opti