Insert when not exists

Is there anyway of getting owb to implement the following sql without
resorting to using a insert update operation:
insert into desttable
(select * from myview where not exists (select null from b where desttable.emp_id=myview.emp_id)
This sounds almost like the perfect application for an insert/update (or merge)
operation. But in my case, I do not want to update the destination tables if I get
a match, I am only interested in using the insert part of a merge operation. I could
create a dummy update clause, but that would be a waste of resources.
Any ideas?
Graeme

What I've done in this situation, and there might be a better way, is use an outer join. Essentially, I do this:
insert into desttable (
select a.*
from mytable a, desttable b
where a.emp_id = b.emp_id(+)
and b.emp_id is null
I believe this accomplishes the same thing as "not exists".
Message was edited by:
user631136

Similar Messages

  • Trigger with Condition problem - insert only when not exists

    Hello experts!
    I have a problem with a trigger I'm trying to create. It compiles but I receive an error message when the trigger fires.
    The scenario is as follows:
    I have a table TBL_PUNKTDATEN. Whenever the status for a record in that table is changed to 3 or 4 I need the trigger to insert a dataset into my target table (TBL_ARBEIT_ZU_GEBIET).
    However, the trigger must only insert data when there's no existing record in the target table. The condition that specifies whether there is a dataset or not, is the field LNG_GEBIET, which exists in the source as well as in the target table. Hence, for each LNG_GEBIET there can be only one dataset in the target table!
    I created a trigger using the following code. However it doesn't work.
    Maybe you'll see what I want to achieve when having a look at my code.
    Can you please help me out on this one?
    Thanks a lot!
    Sebastian
    create or replace
    TRIGGER set_status_arbeit_zu_gebiet AFTER
      UPDATE ON TBL_PUNKTDATEN FOR EACH ROW WHEN(new.INT_STATUS=3 or new.INT_STATUS=4)
    declare
        cursor c is select LNG_GEBIET from TBL_ARBEIT_ZU_GEBIET where PNUM = 1114 and LNG_GEBIET=:new.LNG_GEBIET;
        x number;
    begin
        open c;
        fetch c into x;
        if c%NOTFOUND  then 
        INSERT INTO TBL_ARBEIT_ZU_GEBIET
            LNG_GEBIET,
              LNG_ARBEITSSCHRITT,
              PNUM,
              INT_BEARBEITER,
              DATE_DATUM,
              GEPL_DATUM
            VALUES
            (:new.LNG_GEBIET,
             52,
             1114,
             895,
             sysdate,
             to_date('01.01.1990', 'DD.MM.YYYY')
        end if;
    end;Well, on the first insert the code works properly and inserts the recordset as expected. However, if there is an existing recordset where :new.LNG_GEBIET matches LNG_Gebiet in my target table, I receive the ORA-06502 error!
    Maybe that spcifies it a little bit???
    Hope you can help me!
    Thank you!
    Edited by: skahlert on 23.09.2009 10:26
    Edited by: skahlert on 23.09.2009 10:28

    Thank you very much Peter G!
    That %Rowtype mod did the trick! Great solution! Thanks! The trigger works principally if there wasn't the fact that it fires also when the status of one individual record is 3 or 4.
    I need it to fire only when all records with the same attribute LNG_GEBIET (by the way, you guess was right - it's not a number) are of status 3 or 4.
    Is it possible to use the cursor function for the trigger's when condition?
    Such as:
    declare
        cursor c3 is select COUNT(*) from TBL_PUNKTDATEN where LNG_GEBIET=:new.LNG_GEBIET;and
    declare
        cursor c4 is select COUNT(*) from TBL_PUNKTDATEN where INT_STATUS = 3 and  LNG_GEBIET=:new.LNG_GEBIET or INT_STATUS = 4 and  LNG_GEBIET=:new.LNG_GEBIET;
      And then subsequently somehow compare the results of both cursors?
    ... WHEN c3=c4
    declare
        cursor c2 is select LNG_GEBIET from TBL_ARBEIT_ZU_GEBIET where PNUM = 1114 and LNG_GEBIET=:new.LNG_GEBIET;
        v_c2  c2%ROWTYPE;
    begin
    open c2;
    fetch c2 into v_c2;
    if c2%notfound then
            INSERT INTO TBL_ARBEIT_ZU_GEBIET
            LNG_GEBIET,
              LNG_ARBEITSSCHRITT,
              PNUM,
              INT_BEARBEITER,
              DATE_DATUM,
              GEPL_DATUM
            VALUES
            (:new.LNG_GEBIET,
             52,
             1114,
             895,
             sysdate,
             to_date('01.01.1990', 'DD.MM.YYYY')
            end if;
            close c2;
    end;Please excuse me if the attempt is simply stupid!
    Sebastian
    Edited by: skahlert on 23.09.2009 15:36
    I just saw your reply Max! Thank you! Now I understand far better! Seems to be a successful day! I'm learning a lot! Will also test that method!
    If we could find a solution to the problem I described above it would make it a perfect day! I'm continously trying different attempts to have the trigger only fire when all records are 3 or 4.
    Not that you think I'm just waiting for your answers! That's not the case!
    Thank you all!
    Edited by: skahlert on 23.09.2009 17:30

  • Bug in Tabular form Not Exist Validation, fails when creating multiple rows

    Hi,
    I have a Not Exist validation created for a Tabular form:
       select 1 from my_table where col1 = :col1 and col2 = :col2Execution State: For created and Modified Rows
    which is working fine when a row already there in DB
    and I am trying to enter a new row with same data.
    but when there's no data and I enter two rows with same data, validation does not fire, first row should allowed to enter
    but for second row it should give error that data already exists, which is not happening.
    for example,
    let's say I have a row in DB with: 1, 2, 3
    when I try to add a new row with same data ie. 1, 2, 3 validation fires and showing error, which is fine.
    but let's say there's no data in DB and I am entering two rows with:
    1, 2, 3
    1, 2, 3
    validation is not working this time, it is allowing to enter both the rows.
    do I need to create a manual validation for this or what?
    Apex 4.1.1.00.23
    Regards,
    Tauceef
    Edited by: Tauceef on Dec 6, 2012 10:09 AM
    Edited by: Tauceef on Dec 6, 2012 11:22 AM
    Edited by: Tauceef on Dec 6, 2012 11:27 AM

    Hello Tauceef,
    >> Now I got it, I was under impression that it will validate one by one row before insertion,
    >> but it's going to check all the rows first, then do the insertion.
    Just to clear things up, the APEX engine works exactly as you describe, but this is your problem.
    The APEX engine do check\validate all the rows first, one row at a time, and only if all the rows pass validation, the DML processes kick in. The DML processes work on the entire Tabular Form record set (per page view, of course).
    In order for your type of validation to work (the one that queries the database), as you want it, the validation and DML actions have to run together, row by row. This is not how things work, because it’s less efficient/optimal, and may lead to a situation where a certain row can fail validation, but other row(s) already been inserted/updated/deleted into/from the database. This could be a very tricky situation.
    Vikram has suggested to rely on a database constraint, and control the APEX error message. This is possible, although I’m not sure that in this case, the Tabular Form will retain all the user changes, in case of validation error. You should check it.
    Another option, which Marc hinted on, is to manipulate the G_Fxx arrays. In your case, you should loop through the new rows, compute their MD5, and make sure that all the rows have different MD5 values. This is on top of the current validation, which makes sure that the new rows do not already exist in the database.
    Regards,
    Arie.
    ♦ Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
    ♦ Author of Oracle Application Express 3.2 – The Essentials and More

  • SharePoint Calendar "List does not exist " when new item

    Hello Everybody,
    The scenario is as follows:
    I added a new list called "Calendar" and I created a new view to put it in a subsite. Then I did the following process in SPD:
    After creating the list I went to the "Web Part" and exported it as a file, then I inserted into SharePoint as a web part.
    Everything was ok so far. When I tried to add an event / Item to the calendar,  it displays a message that says the list does not exist.
    ***************ERROR:
     List does not exist.
    The page you selected contains a list that does not exist.  It may have been deleted by another user.<nativehr>0x81020026</nativehr><nativestack></nativestack>
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    Exception Details: System.Runtime.InteropServices.COMException: List does not exist.
    The page you selected contains a list that does not exist.  It may have been deleted by another user.<nativehr>0x81020026</nativehr><nativestack></nativestack>
    This happend because i'm trying to add this web part in another subsite.
     Thanks in advance.

    Hi,
    This issue is due to that the WebId property in the exported web part file is not referring to the web where the list exists.
    I recommend to edit the exported file and then search for “WebId”, and then change the value to the GUID of the web where the list exists.
    To get the GUID of the web, use this command: Get-SPWeb -site http://yoursitecollectionURL | select URL,ID.
    Thanks,
    Victoria
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Victoria Xia
    TechNet Community Support

  • ORA-01435: user does not exist when using imp utility

    I installed Oracle 8.1.7.0.0 successfully on WINDOWS 2000 and created a database TEST using DBCA. Then I used a script to creat a tablespace and a user in TEST databse. I could use the imp utility to import the data (a dmp file) to the TEST database without any problem. But after I applied a patch to bring up the version to Oracle 8.1.7.4.1, I got the following error when I tried to use the imp utility again to import the data (a dmp file) to the TEST database.
    IMP-00003: ORACLE error 1435 encountered
    ORA-01435: user does not exist
    IMP-00000: Import terminated unsuccessfully
    I checked that I created the same user test (as it is in dmp file I wanted to import) on TEST, and I could login to TEST using:
    sqlplus test/test@TEST
    The command I used is:
    imp system/password@TEST file=test.dmp full=y log=importTEST.TEST.tmp
    I also tried to use the following command:
    imp system/password@TEST file=test.dmp fromuser=test touser=test log=importTEST.TEST.tmp
    and got the same error as before.
    Anyone has any clues what could go wrong? The only difference for me to import the data on TEST is that the
    previous successful import was done in Oracle 8.1.7.0.0.
    Is it possible that I missed something during the applying of the patch 8.1.7.4.1?
    Thanks, and your help is greatly appreciated.
    Jane

    Ther is a set of instruction to be followed after installing the patch set 8.1.7.4.1 after running it thru OUI.They are as follows. Please complete these steps and u should not have problems any more.
    When applying this patchset on Windows NT and Windows 2000, you must log onto the system as a user with Administrative privileges (e.g., as a user which is a member of the local Administrators group).
    1.Disabling system triggers.
    Before performing the next step, you must first set SYSTEMTRIG_ENABLED = FALSE in the initialization parameter file. To do this add the following line to your init<sid>.ora file and restart the database (see Note 149948.1 in Metalink for more information on this issue).
    systemtrig_enabled=false
    2.Invoke SQL*Plus (sqlplus), connect as internal and run the following:
    select * from duc$ where PACK='JIS$INTERCEPTOR$' ;
    If no rows were returned go to the next step. If a row was returned delete it using the following:
    delete from duc$ where PACK='JIS$INTERCEPTOR$' ;
    commit;
    3.Invoke SQL*Plus (sqlplus), connect as internal and run the following SQL scripts with event 10520 set. NOTE: This event is not intended for regular database operation and when turned on below by the 'ALTER SESSION' command will automatically be turned off by the subsequent 'CONNECT' command.
    ALTER SESSION SET EVENTS '10520 TRACE NAME CONTEXT FOREVER, LEVEL 10';
    ?/rdbms/admin/catalog.sql
    ?/rdbms/admin/catproc.sql
    ?/rdbms/admin/catrep.sql (This only needs to be run if you are using symmetric/advanced replication. This is not necessary for sites using dblinks and read-only snapshots if symmetric/advanced replication is not installed)
    CONNECT / AS SYSDBA;
    update obj$ set status=5 where type#=29 and owner#!=0;
    commit;
    4.You can ignore this step if you have already executed it as part of a previous 8.1.7 patch set install.
    If Java has previously been loaded into the database, invoke SQL*Plus (sqlplus), connect as internal and run the following SQL DDL command(* Note:If Java has not previously been loaded into the database, skip this step).:
    SQL> create or replace java system
    2 /
    (Note that the / (slash) is important to ensure the execution of the command).
    To ensure the correct installation of the XDK in the database run the following 2 scripts (Bug 2115227):
    $ORACLE_HOME/oracore/admin/initxml.sql
    $ORACLE_HOME/rdbms/admin/catxsu.sql
    * To determine whether Java has previously been loaded into the database:
    invoke SQL*Plus (sqlplus), connect as internal and run the following:
    SQL> select count(*) from all_objects where object_type like 'JAVA%';
    Java is installed if you get a non zero result returned from the query.
    5.You can ignore this step if you have already executed it as part of a previous 8.1.7 patch set install:
    If Java has previously been loaded into the database, invoke SQL*Plus (sqlplus), connect as internal and run the following scripts which are located in $ORACLE_HOME/javavm/install ( Note: If Java has not previously been loaded into the database, you can skip this step):
    load_jis.sql
    jisja.sql
    initjsp.sql
    jspja.sql
    Notes:
    When running the $ORACLE_HOME/javavm/install/jisja.sql script the following error may be reported and can be ignored:
    call jis_exit_java_session(0)
    ERROR at line 1:
    ORA-29515: exit called from Java code with status 0
    Bug 1459233 was filed against this problem which is fixed in 9i.
    6.If you deleted a row from duc$ in step 8 then reinsert it again. Invoke SQL*Plus (sqlplus), connect as internal and run the following SQL:
    insert into duc$ (OWNER, PACK, PROC, FIELD1, OPERATION#, SEQ) values ('SYS', 'JIS$INTERCEPTOR$', 'USER_DROPPED', 0, 1, 1);
    commit;
    7.Enabling system triggers.
    You must either remove SYSTEMTRIG_ENABLED from the initialization parameter file or explicitly set it to TRUE before attempting any other patch set post-install steps. Restart the database.
    8.This step is optional - it will recompile all invalid PL/SQL packages now rather than when accessed for the first time - you can also use utlrcmp.sql to parallelize this. Invoke SQL*Plus (sqlplus), connect as internal and run the following SQL script:
    ?/rdbms/admin/utlrp.sql
    9.Execute the following steps only if you have installed Oracle interMedia Text in the database you are attempting to modify:
    If you have not previously unlocked the ctxsys account and supplied a password for that account, you need to do so. (If you have needed to use Oracle Text in any way prior to applying the patchset, you will have already performed this step, and you can skip this.) Do so by issuing the following statement:
    ALTER USER ctxsys IDENTIFIED BY <passwd> ACCOUNT UNLOCK;
    If you have already installed 8.1.7.2 or 8.1.7.3, go directly to step 7 below.
    If you have already installed 8.1.7.1, go directly to step 5 below.
    CONNECT ctxsys/<passwd>;
    @?/ctx/admin/upgrade/u0801071.sql
    CONNECT ctxsys/<passwd>;
    @?/ctx/admin/upgrade/u0801072.sql
    CONNECT / AS SYSDBA;
    @?/ctx/admin/upgrade/s0801074.sql
    CONNECT ctxsys/<passwd>
    @?/ctx/admin/dr0pkh.sql
    @?/ctx/admin/dr0plb.sql
    @?/ctx/admin/dr0type.plb
    @?/ctx/admin/dr0typec.plb
    9.You can ignore this step if you have already executed it as part of a previous 8.1.7 patch set install:
    The installation of this patch set fixes a potential security hole in the XSQL Servlet - see here for more detail. The patchset installation does not, however, modify any of the Oracle HTTP Server configuration files to reflect changes to the XSQL Servlet installation. If you have previously installed the Oracle HTTP Server, you will need to update one of the configuration files manually after the patchset installation is complete. If you do not do so, the XSQL Servlet may not work in the context of the Oracle HTTP Server after the patchset is installed. To update your Oracle HTTP Server configuration, perform the following steps:
    1) Edit the file: $ORACLE_HOME/Apache/Jserv/conf/jserv.properties
    2) Search for the string: "XSQLConfig.xml File location"
    3) Modify the parameter wrapper.classpath on the line immediately following the above string to read: $ORACLE_HOME/oracore/admin
    4) Save the file.
    10.You can ignore this step if you have already executed it as part of a previous 8.1.7 patch set install:
    The installation of this patch set fixes a potential security hole in the PL/SQL XML parser - see here for more detail. To load the new XML parser in to the database, run the following script as user SYS:
    ? /xdk/plsql/parser/bin/load.sql
    11.If you are using the RMAN catalog then upgrade it as follows:
    rman catalog <user/passwd@alias>
    upgrade catalog;
    upgrade catalog;
    The post install actions are now complete and the database is now ready for use.

  • Cannot insert PS_TXN ORA-00942 table or view does not exist

    We are using jdev 11.1.1.4.0
    We have two users in the database and various application modules which connect to these users using datasources
    We have tested the application with applicatin module pooling enabled off to test for passivation and activation errors and the application works fine.
    Also on our internal test enviorment which has more then 10 concurrent users the application works fine
    But at UAT it has started suddenly to give errors Cannot insert in PS_TXN ORA-00942 table or view does not exist
    When I see the data in PS_TXN tables in various users I can see that passivation has taken place for the same day when there sporadic errors have been reported all having the cause as ORA-00942 table or view does not exist.
    But one strange thing that I have observed is that the COLLID column has sequence numbers interchanged for the users randomly, database user 1 has sequence number from database user 2 seq and vice a versa in COLLID
    As far as this problem goes the passivation should have failed with ORA-00001 primary key voilated but that is not the case
    May be the keys have still not got to a number where they collide.
    But I am totally taken aback on such a behaviour and I am not sure how to correct it.
    So we have two porblems here
    1) why did this error come in first place PS_TXN ORA-00942 table or view does not exist
    2) Why are the sequence numbers interchanged for the databse users ?
    Edited by: user3067156 on Jun 19, 2012 3:12 AM

    I got reply to my second question
    It looks like a bug in the framework and the suggestions are to use only one ps_txn and ps_txn_seq by modifying the internal connection
    But the first problem is not yet known why did it appear suddenly
    Edited by: user3067156 on Jun 19, 2012 3:12 AM

  • Substitute nulls for blank when row does not exist??

    I am trying to put a query together to build a fixed width file. I am using rpad and using NVL to substitute for nulls. That seems to work fine until I have to do a multi table select. I run into a problem when the the id field in the customer table does not exist in the customer_addr table. The NVL works if the id exists and it does insert the blank for the null, but if the id is not there, then I get the null instead. How can I force the blank for the case where the row is not even in the second table without changing the data in the table?
    select
    rpad('MYDATABASE',20),
    rpad(id,20),
    to_char(updt_dttm,'yyyymmddHHMMSS'),
    rpad(fname,40),
    rpad(mname,35),
    rpad(lname,40),
    (select rpadNVL(a.addr1,' '),10) from customer_addr a where a.id = customer.id and a.addr_type = 100)
    from customer
    Thanks!

    Hi,
    Welcome to the forum!
    user1189388 wrote:
    I am trying to put a query together to build a fixed width file. I am using rpad and using NVL to substitute for nulls. That seems to work fine until I have to do a multi table select. I run into a problem when the the id field in the customer table does not exist in the customer_addr table. The NVL works if the id exists and it does insert the blank for the null, but if the id is not there, then I get the null instead. How can I force the blank for the case where the row is not even in the second table without changing the data in the table?
    select
    rpad('MYDATABASE',20),
    rpad(id,20),
    to_char(updt_dttm,'yyyymmddHHMMSS'),
    rpad(fname,40),
    rpad(mname,35),
    rpad(lname,40),
    (select rpadNVL(a.addr1,' '),10) from customer_addr a where a.id = customer.id and a.addr_type = 100)
    from customer
    Thanks!Sorry, I'm not sure I understand the problem.
    Is the problem with the last column in your SELECT clause?
    (select rpadNVL(a.addr1,' '),10) from customer_addr a where a.id = customer.id and a.addr_type = 100)It looks like you're missing a left-parentheses between RPAD and NVL. If you're getting anything other than an error message, this is probably not what you're running.
    At any rate, the scalar sub-query (the entire expression I quoted above) will be NULL if it doesn';t find any row. You need to apply RPAD and NVL to the results of the scalar sub-query, like this:
    RPAD ( NVL ( (      SELECT  a.addr1
              FROM     customer_addr     a
              WHERE     a.id          = customer_id
              AND     a.addr_type     = 100
         , 10
         )     I hope that answers your question.
    If not, please explain more clearly, and be specific about where the problem is.
    When you post output (or any formatted text) on this site, type these 6 characters:
    (all small letters, inside curly brackets) before and after each section of formatted test.  That's what I did above.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • INSERT rows that do not exist

    I need to update (post) a table with summarized totals from another table. It is possible that the matching rows do not exist so I want to insert them before posting (UPDATE) to them. There is a table named BillingDetail that is summarized to insert into
    another table named BillingHistory when rows do not match on 4 different columns. Below is my first shot at doing this but am not sure if the NOT IN clause is correct or maybe there is another (better) way.
    INSERT INTO [dbo].[BillingHistory]
    ([entity]
    ,[plincd]
    ,[pgrpcd]
    ,[pitmcd]
    ,[hstyr]
    ,[corpnbr]
    SELECT @entity
    ,plincd
    ,pgrpcd
    ,pitmcd
    ,@hstyr
    ,corpnbr
    FROM (SELECT plincd
    ,pgrpcd
    ,pitmcd
    ,corpnbr
    ,SUM(qty) AS TotalQty
    ,SUM(extprc) AS TotalExtPrice
    FROM dbo.BillingDetail
    GROUP BY corpnbr, plincd, pgrpcd, pitmcd) AS DT
    WHERE pitmcd NOT IN(SELECT pitmcd FROM dbo.BillingHistory WHERE plincd = DT.plincd AND pgrpcd = DT.pgrpcd AND pitmcd = DT.pitmcd AND corpnbr = DT.corpnbr);

    Not knowing the keys of BillingHistory, it is difficult to say whether your INSERT is correct, but it does look funny. My guess is that all six columns constitute the key, in which case this would be better:
       INSERT INTO [dbo].[BillingHistory]
               ([entity]
               ,[plincd]
               ,[pgrpcd]
               ,[pitmcd]
               ,[hstyr]
               ,[corpnbr]
          SELECT @entity
               ,plincd
               ,pgrpcd
               ,pitmcd
               ,@hstyr
               ,corpnbr
          FROM (SELECT plincd
                  ,pgrpcd
                  ,pitmcd
                  ,corpnbr
                  ,SUM(qty) AS TotalQty
                  ,SUM(extprc) AS TotalExtPrice
               FROM  dbo.BillingDetail
             GROUP BY corpnbr, plincd, pgrpcd, pitmcd) AS DT
                  WHERE  NOT EXISTS (SELECT *
                                     FROM   dbo.BillingHistory BH
                                     WHERE  BH.entity = @entity
                                       AND  BH.plincd = DT.plincd
                                       AND  BH.pgrpcd = DT.prgpcd
                                       AND  BH.pitcmd = DT.pitcmd
                                       AND  BH.hstyr  = @hstyr
                                       AND  BH.corpnbr = DT.corpnbr)
    And even better may be to use MERGE as Ronen suggested, but I want to see the CREATE TABLE statements (including keys) for the table before I try that.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Not existing can not be inserted

    Dear Experts,
    I am getting an error message if I am trying to change Purchase Requisition.
    There are additional inserted item in the new  tbale 'LT_BAPI_NEW'.
    In the table  'LT_BAPI_OLD' are only two items. What is wrong there ?
    I have thought with this FM it is really possible to change a PReq.
    What can I do in this case ?
    The item 00030 is not existing can not be inserted.
    CALL FUNCTION 'BAPI_REQUISITION_CHANGE'
          DESTINATION av_rfc_dest
          EXPORTING
            NUMBER                           = '1000115373'
          TABLES
            REQUISITION_ITEMS_OLD   = LT_BAPI_OLD
            REQUISITION_ITEMS_NEW = LT_BAPI_NEW
            RETURN                             = LT_BAPIRETURN
          EXCEPTIONS
            OTHERS                = 1.
    Friendly Regards
    ertas

    Hi,
    Refer to this link..[Help me about BAPI_REQUISITION_CHANGE!!!|Help me about BAPI_REQUISITION_CHANGE!!!]

  • Table or view does not exist when using in PL/SQL block

    I hav something strange...
    When i execute a query it works just fine... When i use the exact same query in a function i want to create, i get the error 'table or view does not exist'
    I create the function with the same user then when i'm executing the query.
    For example:
    select name,userid from portal.WWLOG_ACTIVITY_LOGS
    if i execute this... it works fine. I get my results.
    However when i create a function:
    CREATE OR REPLACE FUNCTION EBUSINESS.GET_USER_CREATOR (p_userid IN Varchar2) return VARCHAR2
    as
    /*CURSOR c_user_creator IS
    select distinct name,userid from portal.WWLOG_ACTIVITY_LOGS
    where sub_domain = 'user' and action = 'create'
    and name = p_userid;*/
    v_creator varchar2(500);
    v_ret_val VARCHAR2(500) := 'NOT_FOUND';
    BEGIN
    select userid into v_ret_val from portal.WWLOG_ACTIVITY_LOGS
    where sub_domain = 'user' and action = 'create'
    and name = p_userid;
    --v_ret_val := x.userid;
    --end loop;
    -- Is the user in the group or not?
    /*OPEN c_user_creator;
    FETCH c_user_creator INTO v_creator;
    IF c_user_creator%FOUND THEN
    v_ret_val := v_creator;
    ELSE
    v_ret_val := 'NOT FOUND';
    END IF;
    CLOSE c_user_creator;*/
    Return v_ret_val;
    END;
    The table or view does not exist...
    I tryed with cursor, select into, for x in (select....)
    Nothing works.
    A select grant is a select grant right? Are there different grant you should use so you can select it into a function or just do a normal select?
    I also tryed to create a view that just sais select * from WWLOG_ACTIVITY_LOGS but that doesn't work...

    Are there different grant you should use so you can
    select it into a function or just do a normal select? Yes. Grants on objects used in functions/procedures must be given directly to the user, and not through a role.

  • I keep getting this error in Dreamweaver when I am trying to upload my website?  Can you tell me what I am doing wrong?  here is the error message: /html - error occurred - Unable to create remote folder /html.  Access denied.  The file may not exist, or

    I keep getting this error in Dreamweaver when I am trying to upload my website?  Can you tell me what I am doing wrong?  here is the error message: /html - error occurred - Unable to create remote folder /html.  Access denied.  The file may not exist, or there could be a permission problem.   Make sure you have proper authorization on the server and the server is properly configured.  File activity incomplete. 1 file(s) or folder(s) were not completed.  Files with errors: 1 /html

    Nobody can tell you anything without knowing exact site and server specs, but I would suspect that naming the folder "html" wasn't the brightest of ideas, since that's usually a default (invisible) folder name existing somewhere on the server and the user not having privileges to overwrite it.
    Mylenium

  • User gets "This network connection does not exist" when she tries to log on to Terminal Server (2008 R2)

    User gets "This network connection does not exist" when she tryes to log on to Terminal Server (2008 R2)
    I got more than 100 users. Shes the only one getting is. We tried four computers (All Windows 7 Pro)
    Nothing useful in event viewer to mention.

    Hi,
    Thank you for posting in Windows Server Forum.
    Does that user able to login previously?
    From your comment, it seems that there is some permission issue with that user. As you have checked that user with different system also. Please check that user is added under “Remote Desktop User” local group and also allowed “Allow log on through
    Remote Desktop service” permission under group policy. Also please check that when user tries to login it uses “Domainname\Username” format.
    In addition for a try, also check by disabling firewall on one particular system.
    To add users and groups to the Remote Desktop Users group by using Local Users and Groups snap-in:
    1.  Click Start > Administrative Tools, Open Computer Management.
    2.  In the console tree, click the Local Users and Groups node.
    3.  In the details pane, double-click the Groups folder.
    4.  Double-click Remote Desktop Users, and then click
    Add.
    5.  In the Select Users dialog box, click Locations to specify the search location.
    6.  Click Object Types to specify the types of objects you want to search for.
    7.  Type the name you want to add in the Enter the object names to select (examples) box. 
    8.  Click Check Names.
    When the name is located, click OK.
    More information:
    Remote Desktop disconnected or can’t connect to remote computer or to Remote Desktop server (Terminal Server) that is running Windows Server 2008 R2
    http://support.microsoft.com/kb/2477176/en-us
    Hope it helps!
    Thanks,
    Dharmesh

  • The action could not be completed because of a conflict with the original item. The conflict may have occurred when an existing item was updated on another computer or device. Open the item again and try making your changes. If the problem continues, cont

    I have a user on an iMac 10.6 connected to our domain.  She uses Outlook web access for email on our exchange server.  Last week she received the following message which is randomly preventing her from sending emails.  She claims no attachment was involved in the original email when this all started.  I have not been able to look at her account as she is out of the office but maybe someone else dealt with this issue.  I realize this may not be Mac related but thought I'd give it a try.  She did say it occurred once over two days while working on a PC but it continued over the past weekend.
    If an internal user tries to send a message with infected attachment using Outlook Web Access, it may report the following error message: The action could not be completed because of a conflict with the original item. The conflict may have occurred when an existing item was updated on another computer or device. Open the item again and try making your changes. If the problem continues, contact technical support for your organization.
    This is because F-Secure Anti-Virus for Microsoft Exchange has detected a virus in the attachment. If the user tries to send the message again, the message will be sent but without the attachment. At the same time a blank message with an attachment named "Attachment_information.txt" will remain in the user's Drafts folder. The "Attachment_information.txt" will contain information about the virus detected in the message.

    PS - have found other posts indicating that clips smaller than 2s or sometimes 5s, or "short files" can cause this. Modern style editing often uses short takes ! Good grief I cannot believe Apple. Well I deleted a half a dozen short sections and can export, but now of course the video is a ruined piiece of junk and I need to re-do the whole thing, the sound etc. which is basically taking as much time as the original. And each time I re-do it I risk again this lovely error -50 and again trying to figure out what thing bugs it via trial and error instead of a REASONABLE ERROR MESSAGE POINTING TO THE CLIP IT CAN'T PROCESS. What a mess. I HATE this iMovie application - full of BUGS BUGS BUGS which Apple will not fix obviously, since I had this product for a few years and see just hundreds of hits on Google about this error with disappointed users. Such junk I cannot believe I paid money for it and Apple does not support it with fixes !!!
    If anyone knows of a GOOD reasonably priced video editing program NOT from APPLE I am still looking for suggestions. I want to do more video in future, but obviously NOT with iMovie !!!

  • Error: The specified mailbox database [Mailbox Database Name] does not exist, when you try to export mailbox in Exchange 2007

    [Symptom]
    ======================
    In Exchange 2007, when you want to export mailbox to a .pst file, you should run the
    Export-Mailbox cmdlet from a 32-bit computer that has the following installed:
    The 32-bit version of the Exchange management tools
    Microsoft Office Outlook 2003 SP2 or later versions
    If not, you may encounter the following error message:
    You check that you have these required installed, but you get the error below when you run Export-Mailbox in EMS.
    “The specified mailbox database [Mailbox Database Name] does not exist.”
    [Cause Analysis]
    =======================================
    This is because that the account you use to run Export-Mailbox cmdlet don’t have the Exchange Server Administrator role assigned.
    You can check if this account has been delegated the Exchange Server Administrator role through the following path.
    EMC -> Organization Configuration-> Check permissions in the result pane.
    To delegate this Exchange Server Administrator role, right click on the
    Organization Configuration node and choose Add Exchange Administrator,
    you will see the Add Exchange Administrator window.
    [More Information]
    ==============================
    Export-Mailbox
    http://technet.microsoft.com/en-gb/library/aa998579(v=exchg.80).aspx
    How to Export and Import mailboxes to PST files in Exchange 2007 SP1
    http://blogs.technet.com/b/exchange/archive/2007/04/13/3401913.aspx
    Exchange 2007 cannot export pst files via its powershell
    http://social.technet.microsoft.com/Forums/forefront/en-US/b3bc0dce-35f3-4a69-9a33-4f2a855b9f94/exchange-2007-cannot-export-pst-files-via-its-powershell?forum=exchangesvrgenerallegacy
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Hi,
    Based on my test, if you make the user the owner of the database (rather than a user with the db_owner role), when you create a query, it creates it under the dbo schema rather than DOMAIN\username.
    Steps to do so (in Management Studio):
    Right click database, select Properties 
    Click File 
    Change Owner in the textbox 
    OK to confirm 
    Downside - other users under db_owner role will still have their username appended. So schemas have to be created for these users.
    Jaynet Zhang
    TechNet Community Support

  • Windows Server 2008R2 running Remote Desktop Services reports printer process does not exist when installing PDF printer

     Windows Server 2008R2 running Remote Desktop Services reports printer process does not exist when installing PDF printer, And when Installing network printers from the domain controller it reports it cannot connect to printer.  I can ping all
    network devices. I can connect to the internet.
    On boot I get a netlogon 5719 error followed by service control manager errors 7023,7001 and a group policy error 1129.
    Clients can connect to the remote application and RDP operates to connect to the server internally and externally.
    The domain controller is another server 2008r2 box. I have scoured the internet but have not found any solutions that work yet.

    Hi,
    After referring to your post, it can be identified that the issue which you are facing is mostly due to some network issue in your environment. Please recheck your network connection issue between computer and domain controller. 
    Can you able to ping with IP address and also with fully qualified name of a domain controller in the users' and computers' domain. If it fails states that name resolution issue with computer and domain controller. Are you using MS DHCP Relay agent then there’s
    available Hotfix for the particular Event ID. Please go through this KB 2459530 to fix the error event ID.
    As per the net logon error 5719 which you are facing states that the client component of Netlogon was unable to locate a DC for the domain it was trying to perform an operation against. Below is one of the reason. If this is being logged on a DC and the event
    refers to the DC's own domain, something might be preventing the client component of Netlogon from starting a network session (to itself or to another DC in the domain). The following event 7001 & 7023 states start & stop operation service. Please
    go through beneath article for more details.
    1.  Event ID 5719 is logged when you start a computer
    2.  Netlogon 5719 and the Disappearing Domain [Controller]
    3.  Event ID 1129 — Microsoft-Windows-GroupPolicy
    Hope it helps!
    Regards.

Maybe you are looking for

  • View/preview giant .psb files

    Hi, I was wondering if anyone knew of a good way or an alternative browser maybe to view/preview giant sized .psb files? I am now working on files from 5 - 20 GB each, 30 - 50,000 pixels, and am stuck using Bridge to go thru them, which takes forever

  • Time setting for pdf file presentation

    Can I set different times for different pages of my pdf file when using the whole screen presentation in Adobe Reader? Thanks!

  • Why are my 4x6 and 5x7 prints being clipped?

    My prints are getting clipped no matter what I try to do.  I am losing approximately 1/8" from all sides of the finished print.  From what I can tell, the picture is actually printing larger than the specified size. This is my process: In the Develop

  • How to return to previous page based on record number?

    Not sure if the subject of this is how i shoudl have worded it... but here is what i am looking for... which ever is the easiest to accomplish.... currently when someone completes a form they are taken back to there main pool of records... in some ca

  • Summing the internal table values

    Hi Experts, I have requirement in report to add the values in the internal table based on document no. for example Document no         date                         Amount                Exchange Rate 190000012         05.04.2009                     1