No data found during execution of selection within a function

Hello
I have a select statement based on the USER_ROLE_PRIVS view for a specific granted_role and the user, if I run the statement in SQL/Plus I get the required result, however if I put the same selection in a function and run the function by the same user I get ora-00100 no data found. I run given to the public on the service. Is there a scholarship that I missed

Any help would be great
Tina

If the execution of another schema, add a statement such as authid current_user

create function f_authid_cu return number
  authid current_user
as begin
  return 0;
end f_authid_cu;
/

Tags: Database

Similar Questions

  • Reading several files / locate the data source during execution

    Hi all

    I have a requirement of the company in which I need to read files to different folders. This system is not hosting the ODI agent. There are two folders, the folder A and folder b. Two records may have any number of files. My intention is to read the files in a folder and write the data to a table in a database that resides in another system. This forms a flow for me. For the B folder, I have a similar flow. All files (in the folder A and folder B) have the same structure. The requirement is to read A book during the week and the B folder on the weekend. The system that has the database also runs the ODI agent.

    Here are my questions:

    1. How can I read several files one by one in a folder? Because the read files must be archived, they need to be written in a different folder, file C (for example). How do you archive part? Please note that this machine does not run ODI agent (network share could be an option, but we try to avoid it.

    2. can I have only an interface to read files in folder A and folder B? Everything else remains the same (the processing logic/transformations etc.). Indeed, is there a way to dynamically switch between two files (using a variable, perhaps).

    I've not worked with files and so any help is greatly appreciated.

    Edited by: Sankash 7 May 2009 08:24

    Hi Sankash,

    Hopefully I can help you achieve this task.

    Please go through this link

    Re: import files in a table

    1. you can update the status of the process of the files in a journal/temp table.
    Based on the State of the (transformed) file in the table, you can check the files that has completed its process correctly.

    machine does not run ODI agent:-J' have it is implemented the same type of scenario, in which I am downlading all the files in a common location and treat it from there.

    2. one of the solutions is that: -.

    create two interface with the same structure, but the source table must point to the folder A and B
    Create a variable (week/check) and based on the value, you can call the interfaces.

    second option: -.

    If you're downlaoding the files in a common location, you can reach the spot through a single interface (down load files from folder A or B according to in week/weelend)

    3. If all the files have the same structure, you need only a data store and it should be a variable data store.

    If something is not not clear please me ping / mail to my id (good that now I don't get enough time to go through the forum discussions)

    Also if you need I can send you a diagram wokflow for this loop (read multiple files one by one in a folder)

    Kind regards
    Pascale of M

  • Configuration variable not found during execution by a task scheduler of the SSIS package. Works fine locally from the command window.

    I run an ssis job that works fine locally on the server application, but when the runs along a task scheduler it receives variable not found even if the variable is defined at the level of the system. SSIS package relationship parent/child and must pass the variable that has a value of the location of the configuration file. We tried to set the variable in a script and local setting, but none seems to be recognized. Any help is appreciated. The environment variable is defined in the package configuration.

    Example of a variable below.

    SSIS_CONFIG = access/config filename path

    Two things: first, the feedback forum is to post your comments on the web site of Microsoft Answers, only not for advice on technical issues.  Secondly, you seem to try to fix a server problem, and none of these forums deal with server issues.  Server issues are covered in the Windows Server forums found here: http://social.technet.microsoft.com/Forums/en-US/category/windowsserver

  • Weird data obtained during execution of the task: AD group search Recon

    Hello
    Im running the scheduled task named: AD group search Recon

    This works. and fills the named research Lookup.ADReconciliation.GroupLookup
    but when lookin in the console of the design, the key Code and Decode values have given weird IE:

    key code: 2 ~ CN = TelnetClients, CN = Users, DC = adtest, DC = com
    Decode: ADITResource ~ CN = TelnetClients, CN = Users, DC = adtest, DC = com


    in the key of code there is an extra * 2 ~ *.
    in the decoding is an extra ADITResource ~

    I think it's a kind of coding for connector commands used in tasks of provision, when I try to set up a user of IOM to Active Directory (in the field of research of the Organization) I get these data

    It is a single line:

    Value: 2 ~ CN = {6AC1786C-016F-11D2-945F-00C04fB984F9}, CN = Policies, CN = System, DC = adtest, DC = com
    Description: ADITResource ~ CN = {6AC1786C-016F-11D2-945F-00C04fB984F9}, CN = Policies, CN = System, DC = adtest, DC = com


    Any ideas?

    Thank you.

    Yes you are right, the key code and decode the keys is due to the codification in the connector to distinguish values from multiple IT resources.

    If you want to get rid of this [resource ~] you need to modify the connector.

    One last thing looks like the base dn you specified for the reconciliation of research is DC = adtest, DC = com with generic filter that is why you find entries like 2 ~ CN = {6AC1786C-016F-11D2-945F-00C04fB984F9}, CN = Policies, CN = System, DC = adtest, DC = com which cannot be a group you want to

    Hope this helps,
    Sagar

  • Fill the programmatic view object during execution

    Hi all

    I have a requirement to switch between the three different data source during execution in a single page. The user interface and the field names are the same for these three cases, but data from various sources (queries).

    So, imagine that we have 3 objects in view which has implemented read-only (object request depending on the view) and we want to fill a display object at the main performance as a data source for my page.

    My idea is to use "Prgorammatic view object" for this data source and then fill dynamically the contents of one of the three objects view read-only based on a setting in the user's selection.

    First of all, I want to know if it is thin approach and if yes, then get some points on the implementation or any other sample.

    I found this example:

    http://techiecook.WordPress.com/2011/05/17/programmatically-populate-view-objects-in-Oracle-ADF/

    Thanks in advance,

    Nasser

    Hello

    It is more a case of use for Adaptive connections. See:https://blogs.oracle.com/groundside/entry/towards_ultra_reusability_for_adf

    You can use EL to change the name of the ViewObject that an iterator in ADF queries its data. If the switch is on the link layer and there is no need for programmatic view objects. Unlike in the article of the blog above, VO 3 exist in your case then you don't need to create on the fly. Just change the name of VO in the managed bean referenced

    Frank

  • The execution of the trigger, 01403 error. 00000 - "no data found".

    Hi guys, Pl/Sql

    When we try to run after initiation, as 01403 error. 00000 - "no data found".

    Trigger is

    CREATE OR REPLACE TRIGGER SYNC_OUGR_USER_ADDRESS

    AFTER INSERT ON OUGR_USER_ADDRESS FOR EACH LINE

    DECLARE

    P_CD_ADDR_TYPE OUGR_USER_ADDRESS. TYPE % CD_ADDR_TYPE;

    P_AD_CITY OUGR_USER_ADDRESS. TYPE % AD_CITY;

    CITY OF P_NM_NAME. TYPE % NM_NAME;

    P_FL_OVERSEAS OUGR_USER_ADDRESS. TYPE % FL_OVERSEAS;

    P_AD_COUNTRY OUGR_USER_ADDRESS. TYPE % AD_COUNTRY;

    P_TEMP_CITY VARCHAR2 (10);

    P_CD_CODE REF_COUNTRY_CODE. TYPE % CD_CODE;

    BEGIN

    P_CD_ADDR_TYPE: =: NEW. CD_ADDR_TYPE;

    P_FL_OVERSEAS: =: NEW. FL_OVERSEAS;

    P_AD_CITY: =: NEW. AD_CITY;

    P_AD_COUNTRY: =: NEW. AD_COUNTRY;

    SELECT LENGTH (TRIM (TRANSLATE (P_AD_CITY, ' + -. 0123456789', ' '))) IN THE DOUBLE P_TEMP_CITY; -to check if the value is numeric

    SELECT NM_NAME IN THE P_NM_NAME OF THE CITY WHERE ID_TOWN = P_AD_CITY;

    SELECT CD_CODE INTO P_CD_CODE FROM REF_COUNTRY_CODE WHERE CD_CODE = P_AD_COUNTRY;

    IF P_CD_ADDR_TYPE ('ma', 'PA') THEN

    IF P_TEMP_CITY IS NULL THEN

    P_AD_CITY: = P_NM_NAME;

    ON THE OTHER

    P_AD_CITY: = P_AD_CITY;

    END IF;

    ON THE OTHER

    P_AD_CITY: = P_NM_NAME;

    END IF;

    IF P_FL_OVERSEAS = "Y" THEN

    P_AD_COUNTRY: = P_CD_CODE;

    ON THE OTHER

    P_AD_COUNTRY: = P_AD_COUNTRY;

    END IF;

    INSERT INTO OUGR_USER_ADDRESS@TO_GVRS

    (ID_ADDRESS,

    CD_ADDR_TYPE,

    AD_UNIT,

    AD_NUM,

    AD_STR1,

    AD_STR2,

    AD_CITY,

    AD_COUNTY,

    AD_ST,

    AD_COUNTRY,

    AD_ZIP5,

    AD_ZIP4,

    FL_AD_RURAL,

    FL_OVERSEAS,

    TM_STAMP

    )

    VALUES (: NEW.ID_ADDRESS,)

    : NEW. CD_ADDR_TYPE,

    : NEW. AD_UNIT,

    : NEW. AD_NUM,

    : NEW. AD_STR1,

    : NEW. AD_STR2,

    P_AD_CITY,

    : NEW. AD_COUNTY,

    : NEW. AD_ST,

    P_AD_COUNTRY,

    : NEW. AD_ZIP5,

    : NEW. AD_ZIP4,

    : NEW. FL_AD_RURAL,

    : NEW. FL_OVERSEAS,

    : NEW. TM_STAMP

    );

    END SYNC_OUGR_USER_ADDRESS;

    /

    Greatly appreciate your help in this regard.

    Thanks in advance.

    Kind regards

    REDA

    Hi, Raj,

    Instead of

    SELECT LENGTH (TRIM (TRANSLATE (P_AD_CITY, ' + -. 0123456789', ' '))) IN THE DOUBLE P_TEMP_CITY; -to check if the value is numeric

    SELECT NM_NAME IN THE P_NM_NAME OF THE CITY WHERE ID_TOWN = P_AD_CITY;

    SELECT CD_CODE INTO P_CD_CODE FROM REF_COUNTRY_CODE WHERE CD_CODE = P_AD_COUNTRY;

    You can say:

    P_TEMP_CITY: = LENGTH (TRIM (TRANSLATE (P_AD_CITY, ' + -. 0123456789', ' ')));

    SELECT MIN (NM_NAME)

    IN P_NM_NAME

    OF THE CITY

    WHERE ID_TOWN = P_AD_CITY;

    SELECT MIN (CD_CODE)

    IN P_CD_CODE

    OF REF_COUNTRY_CODE

    WHERE CD_CODE = P_AD_COUNTRY;

    You don't need the double table much in PL/SQL.

    When you use an aggregate function (MIN, as above) without a clause GROUP BY, the result set is guaranteed to have exactly 1 row.  This also avoids the error (ORA-01422) TOO_MANY_ROWS, which is probably impossible in this example.

  • If Condition get spent during execution, even when the data Condition fails

    Hi gurus,

    We came back to condition in the procedure below


    / * Condition in a procedure * /.

    If i.effective_end_date > p_end_date and i.effective_start_date < = p_end_date

    then

    Start

    If l_future_rec_flag then

    -Call API with update insertion mode

    l_datetrack_mode: = hr_api.g_update_change_insert;

    on the other

    -Call API with Update Mode

    l_datetrack_mode: = hr_api.g_update;

    end if;

    -api call

    end;

    end if;

    / * Condition in a procedure * /.

    data sent to this if condition during execution is as below, I printed it using fnd_file.put_line (fnd_file.log).

    i.effective_end_date > p_end_date and i.effective_start_date < = p_end_date

    31 December 12 > 31 March 13 and 1 January 13 < = 31 March 13

    , my doubt is that the above data made it clear the if condition fails with past data. but during the execution, the condition happened and will block to start and run the api and get api error.

    Error occurred during the assignment process. Check the log file for more details. ORA-20001: unable to change the update of insert mode when there is no future lines

    Cause: The insert DateTrack change update mode can be done if there is no future lines after the current date.

    Action: Perform an update operation DateTrack or erase your changes.

    Error occurred during the assignment process. Check the log file for more details. ORA-20001: unable to change the update of insert mode when there is no future lines

    Can anyone help on this.

    Thanks in advance

    Hi gurus,

    Now, it has been resolved, we used the to_date for date comparison function and now it works perfectly.

  • No data found in the select statement error

    Hi all

    Find my sample table and data structure:
    SQL> desc states;
     Name                                                  Null?    Type
     ----------------------------------------------------- -------- ------------------------------------
     SNO                                                            NUMBER
     SNAME                                                          VARCHAR2(10)
    
    SQL> select*from states;
    
           SNO SNAME
    ---------- ----------
             1 kerala
             2 Tamil nadu
             3 AP
             4 MP
             5 jammu
    Now, I create a block like:
    declare
    v_state varchar2(20):=' AP';
    v_no number;
    begin
    select sno into v_no from states where sname=v_state;
    dbms_output.put_line(v_no);
    end;
    /
    After excecuting this block no data found error takes place.
    Coz in where defective condition. "AP"="AP."

    What oracle function I should use to eliminate this error.

    I tried something like
    where trunc(sname)=trunc(v_state);
    But it defective. Please help me

    / * Don't know what is your exact question, but: * /.

    use the TOPPING instead of TRUNC

    Published by: hoek on November 26, 2011 10:00

  • No data found in SELECT INTO

    Hi all

    I try to choose in a variable in a loop of cursor but I get NO DATA FOUND when
    Select does not return a value.
    I want to set the variable to 0 when the selection fails.

    I tried to add an exception, but I get the following:

    ORA-00900: invalid SQL statement


    Here is the code I am trying to run (the exception is commented):

    Line: -.
    PROCEDURE MyProc IS
    v_op NUMBER;
    BEGIN

    FOR cursor1 IN (select * from myTable)
    LOOP
    Operation of SELECTION IN v_op from operationsTable where id = cursor1.ID;


    -EXCEPTION *.
    -WHEN NO_DATA_FOUND THEN
    -v_op: = 0;

    -END; *

    END LOOP;
    MyProc END;
    Line: -.

    Does anyone know how to set a variable when the selection fails and NO DATA FOUND?
    Thank you
    dyahav

    You need to hold your exception by BEGIN and END

    BEGIN
    
    select into...
    
    EXCEPTION WHEN NO_DATA_FOUND
    do_something
    END;
    
  • Can I change dynamically during execution Data Source?

    I need run the same reports on test environment and the production environment. How could I change source data during execution, according to the users want to run reports by querying the database test or production without amendment report definition?

    Hello

    what I would recommend in your case: set up your development/test systems as separate systems parallel to your production system. Clone your production environment for these development systems. Then a developer can login to the development system and run the reports (and modify it without touching the actual production system) and normal users work on the production system and only for validating them new developments, that they connect to the test system.

    It's a standard approach in software development and COMPUTER systems operations.

    How to watch your infrastructure, I have the impression that you have two databases and Server BI (prod and test)? Why not set up a test environment for the BI server, too?

    Best regards
    David.

  • Fractured block found during the backup of the data file

    Hello

    Version: 10.2.0.3

    I take backups RMAN and export of db every night. The following error is recorded in the file alertlog while taking rman full backup. Also, the backup is very slow and it worked at 18hrs now (200 GB db size). Could someone please explain this to me that this error on and the action to take to solve this problem? Thank you

    Kill Mar 3 20:21:52 2009
    A hexadecimal dump (file 16, block 490151) in file /opt/oracle/admin/hol/udump/holiday_ora_11507.trc trace
    Corrupt block relative s/n: 0x04077aa7 (16, block 490151 file)
    Fractured block found during the backup of the data file
    Bad block data:
    type: 2 format: 2 rdba: 0x04077aa7
    last change the SNA: following 0x0013.830b4809: 0 x 4 flg: 0x04
    spare1: 0 x 0 spare2: 0 x 0 spare3: 0x0
    consistency in tail value: 0 x 10340201
    check the value in the block header: 0x7e2e
    checksum calculated block: 0 x 361
    Review of blocknum = 490151, file=/opt/oracle/oradata/hol/undotbs03.dbf. found valid data

    The problem may occur when the data being backed up file is simultaneously and widely used. It does not necessarily mean there is really block corruption. And in your case it seems that all is well:

    Review of blocknum = 490151, file=/opt/oracle/oradata/hol/undotbs03.dbf. found valid data

    On metalink:

    A broken block Messages in the Alert.log during RMAN of Datafile backup
    DOC - ID: 199933.1

    Werner

  • Camembert - no data has been found during initialization

    Have a pie with 4 elements above the Graph chart to filter the data in the graph by. When you first access the card, the "no data found" message. If you then filter by using one of the 4 elements, the data is displayed correctly and for the rest of the session, everything works fine.

    How I initialze the graph to display the data from the GET go?

    The table is not a button GO, all the elements (select lists) are conditioned to submit when it is used.

    Jeff

    Jeff,

    Your problem is related to the initial value of your page elements. See this example and threads associated with it:

    http://Apex.Oracle.com/pls/OTN/f?p=31517:117

    Basically, you need to calculate your selection lists, radio buttons, check boxes on the first page load.

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    -------------------------------------------------------------------

  • SELECT statement: no data found

    I have the following select statement:
    DECALRE
    
     l_customerID INTEGER :=0;
    
    BEGIN
    
     SELECT DISTINCT customer_id into l_customerID FROM customer where status = 'd';
    
    If  l_customerID = 0 then
    DBMS_OUTPUT.PUT_LINE('Not deactivated')
    else
    DBMS_OUTPUT.PUT_LINE('deactivated')
    end if;
    END
    /
    However, I got this error when he tried to enter this if statement when l_customerID = 0

    ORA-01403: no data found
    How to do in the stated case when l_customerID = 0 or should I change my select statement or what?

    Hi try this

         l_customerID INTEGER :=0;
    
    BEGIN
    
         select
              nvl((SELECT DISTINCT customer_id into l_customerID FROM customer where status = 'd'),'-1')
         from
              dual
    
    If  l_customerID = 0 then
         DBMS_OUTPUT.PUT_LINE('Not deactivated')
    else
         DBMS_OUTPUT.PUT_LINE('deactivated')
    end if;
    END
    / 
    

    It only works if the inner query will return a single line... If a return that one line will return the exception of other lines.

    Concerning
    Singh

  • Update ATML report header with the data collected during the execution of the test?

    I need to add data obtained during the tests to the report header (ATML TR5/6_Horizontal.xsl). I tried to implement all update features I've seen here, nothing done. I can get some added things if I do during the PreUUT, but I do not have these data. Does not work try the same commands (use the Parameters.UUT.AdditionalData container). I have not been able to get either the recall of ModifyReportHeader to do. Help and I saw others examples of support seem to be about half of what I need to this implementation. Any help is appreciated.

    -Randy

    Hello

    ModifyReportHeader would be the first thing I would try - what kind of problems did you have when you tried this?

    Have you read through the following knowledge base?  How to change a report XML TestStand header

    Kind regards

  • Can I create multiple dynamic entries during execution?

    Can I create multiple dynamic entries during execution?

    Oracle 11g
    Request Express 4.0.2.00.06

    Here's my problem:
    We have a table that contains metadata about the files (paper or electronic).
    We hope that we can need more columns in the table at some point and do not want to change the table or the application.

    So to do this I would like to create:

    A table called TBL_FILE with columns:
    NUMBER of TBL_FILE_ID (this will be the primary key)
    TBL_FILE_NAME VARCHAR2 (1000) (this will be the name of the file)

    A second table will be called TBL_FILE_META with columns:
    NUMBER of TBL_META_ID (this will be the primary key)
    NUMBER of TBL_FILE_ID (this will be the key to forign to the files table)
    TBL_META_COLUMN VARCHAR2 (30) (this is what would be the name of the column if it existed in TBL_FILE)
    TBL_META_VALUE VARCHAR2 (1000) (this is the value of this record and the column "would be")

    If a person can have as many meta data in the file to add columns to the table.
    The problem is how can I allow users to add as much data as they wish with them having to re develop page.

    Other things to note is that we would like this be on one page.
    I know how to add we can create inserts several rows using a SQL (editable report).
    However the TBL_META_VALUE in the TBL_FILE_META column will sometimes be a selection list and other times one text box or a numeric field.
    So I don't see now a SQL (editable report) would work for this and I can't create a table of elements on the page running I can?

    No idea how I might accomplish this? Is there a better way to do this?

    It is a term or a name for what I'm doing by creating these "virtual" columns in another table?
    I found this method looking at the workflow tables Oracles.

    Welcome to the Oracle Forums!
    >
    Can I create multiple dynamic entries during execution?

    Oracle 11g
    Request Express 4.0.2.00.06

    Here's my problem:
    We have a table that contains metadata about the files (paper or electronic).
    We hope that we can need more columns in the table at some point and do not want to change the table or the application.

    So to do this I would like to create:

    A table called TBL_FILE with columns:
    NUMBER of TBL_FILE_ID (this will be the primary key)
    TBL_FILE_NAME VARCHAR2 (1000) (this will be the name of the file)

    A second table will be called TBL_FILE_META with columns:
    NUMBER of TBL_META_ID (this will be the primary key)
    NUMBER of TBL_FILE_ID (this will be the key to forign to the files table)
    TBL_META_COLUMN VARCHAR2 (30) (this is what would be the name of the column if it existed in TBL_FILE)
    TBL_META_VALUE VARCHAR2 (1000) (this is the value of this record and the column "would be")

    If a person can have as many meta data in the file to add columns to the table.
    The problem is how can I allow users to add as much data as they wish with them having to re develop page.
    >
    Creation of dynamic Page elements is not available. You must create surplus items and hide/show, etc. But you cannot change the element Type. Overall, too many restrictions in this approach.
    >
    Other things to note is that we would like this be on one page.
    >
    The limit of 100 points will hit you if you go with extra page element. With the form of tables that should not be a limitation, unless you're exceeding the limit of 50 APEX_APPLICATION point. G_Fnn points and limitation of the 60 column of the region report with "(analyze the query executing only) use generic name column" in the dynamic region.
    >
    I know how to add we can create inserts several rows using a SQL (editable report).
    However the TBL_META_VALUE in the TBL_FILE_META column will sometimes be a selection list and other times one text box or a numeric field.
    >
    If the type if the item is variable, that doesn't mean that you have to type a way to store the item. Metadata of meta data.
    >
    So I don't see now a SQL (editable report) would work for this and I can't create a table of elements on the page running I can?
    >
    Yes, you can do it. Update report / query in a table can be built from the metadata using the SQL query that returns the PL/SQL function . It will be a bit of coding in PL/SQL where you use metadata and metadata of Meta data to restore your SELECTION with the right APEX_ITEMs. He might have a decrease in performance associated with it, but it will not be a serious degradation.
    >
    No idea how I might accomplish this? Is there a better way to do this?

    It is a term or a name for what I'm doing by creating these "virtual" columns in another table?
    I found this method looking at the workflow tables Oracles.
    >
    I guess it's just a good TNF. This is the master model / retail Design, sounding more modern? ;)

    Kind regards

Maybe you are looking for

  • The firefox window "jumps" when he loses or gains focus. How can I stop this?

    This seems to have started with the latest version of Firefox - 20.0.1Whenever the focus leaves or enters the window of Firefox, the Firefox window "jumps." Can I stop this?

  • Flashing BIOS R830 Satellite on the Satellite R630

    I have a version of Bios R830 - 1GZ 3.70 THIS Version 1.50And also a R630 - 138 BIOS version 2.20 THIS Version 1.60 (this is the most up to date for this discontinued model version). The elders will recognize my WD Storage for what it is--it is an ex

  • Equium L20 - 198 expand the RAM

    Equium L20 daughter - 198 has the factory supplied 512 MB RAM installed 2rx16 PC2. I want to expand the memory to see if it improves performance with programs like MSN which seem to be grinding to a halt and freeze enough frequently. After looking on

  • ThinkPad X 220 fan error

    Hello community of Lenovo, Today my Thinkpad x 220 has stopped working and gives me a fan error. Is anyone able to advise how to solve this problem? I was able to reboot once since but had no chance once again. Previously I had overheating, problems

  • Satellite L655-1john says error "the path network not found" when starting

    I just bought the laptop above and I did all the stuff he wanted to start and now when it is in the login screen and I go to my user and press ok while I connect it gives me the above message "the network path was not found" I have windows 7.Does any