why its shows no data found?

why its shows no data found?

I have SEQ column in my table.

DECLARE
V_ENAME varchar2 (20);
V_SEQ varchar2 (20);
L_E_SEQ varchar2 (20);
L_ENAME varchar2 (20);

Start
SELECT ENAME, SEQ IN V_ENAME, V_SEQ FROM VEN_EMP WHERE EMPNO = 7369;
IF V_SEQ = 1 THEN
L_ENAME: = V_ENAME;
ON THE OTHER
L_E_SEQ: = V_SEQ-1;
SELECT ENAME IN V_ENAME FROM EMP WHERE SEQ = L_E_SEQ;
dbms_output_line (v_ename);
END IF;
END;

Published by: ayman on March 19, 2012 23:34
  1  DECLARE
  2  v_ename varchar2(20);
  3  v_sql varchar2(20);
  4  L_E_SEQ varchar2(20);
  5  V_SEQ NUMBER(20);
  6  L_ENAME VARCHAR2(20);
  7  begin
  8  SELECT ENAME,SEQ INTO V_ENAME,V_SEQ
  9   FROM
 10  (select 'FOR' ENAME,1 SEQ,100 EMPNO from dual union all
 11  select 'FOR' ENAME,2,7369 from dual
 12  ) WHERE EMPNO=7369;
 13  IF V_SEQ=1 THEN
 14  L_ENAME:=V_ENAME;
 15  ELSE
 16  L_E_SEQ:=V_SEQ-1;
 17  SELECT ENAME INTO V_ENAME
 18  FROM
 19  (select 'FOR' ENAME,1 SEQ,100 EMPNO from dual union all
 20  select 'FOR' ENAME,2,7369 from dual
 21  ) WHERE SEQ=L_E_SEQ;
 22  dbms_output.put_line(v_ename);
 23  END IF;
 24  END;
 25  /

FOR

PL/SQL procedure successfully completed.

What is the problem?

Tags: Database

Similar Questions

  • Upgrade to 4.0 shows no data found on tabular forms

    Hello

    After the upgrade from 3.x and 4.0, an application that had many tabular forms does now show "no data found" in their respective regions. A few pages work, while others do not.

    Curiously, if I take the same sql in the source box and create a new page from scratch, the new tabular form displays data correctly. It seems to be a problem with the upgrade. In one case, it's a very simple "select col1, col2 sample_table etc"type of syntax. " Nothing complex here.

    I wanted to see if others have experienced.

    Flipping through the Setup log, I can't find any errors. The validation stage shows also all own compiled objects.

    Thank you!
    Erik

    Erik,

    We have listed this problem on our questions about page:

    http://www.Oracle.com/technology/products/database/application_express/HTML/4.0_known_issues.html

    Search bug 9879227. We are working on this resolution in the APEX 4.0.1.

    Kind regards
    Marc

  • Button cancel LOV shows "No Data Found"

    I have 5 fields in a form where users can search for different information based on what they type in the search fields. Once they have their search criteria, they hit a "Search" button, I have a trigger button when_button_pressed on the search button. This trigger I have logic to build a record group dynamically, after the General receiver gets filled dynamically I use the bulit SHOW_LOV to my LOV to the end user. It all works well, however, there is a new requirement in where the client wants a message "no data found" displayed on the screen when users type information arbitrary/no valid on all areas of research. I could accomplish this by simply putting the following code in the ELSE part of my IF statement main to my LOV.

    ON THE OTHER
    IF SHOW_LOV ('LIAB_LST_LOV') THEN
    display_message ('no data found');
    END IF;
    END;

    The preceding code displays the message that they want to see when search users research on invalid criteria. So finally, here is the question, when their research on VALID criteria that the LOV appears of course without any problem, but if users click on the button 'Cancel' in the LOV window they get the message "No data found" above too. They only see the message, if there is data invalid sought.

    How can I make sure that after the LOV gets filled my code does not return the message no data found when they press the LOV Cancel?

    Thank you

    Adrian

    Hello

    See the GET_GROUP_ROW_COUNT integrated in the online help.

    François

  • Interactive report: "no data found" when first loading

    Hello

    I use APEX 4.0 with Oracle 10 g r2 under Windows XP Pro SP3.

    I have an interactive report and a menu with a few items to filter the report.

    The problem is that the first time I load the page, the report shows "no data found", when I reboot, it works. If I navigate to another page and then I go back to the page of report, it also works.

    There seems to be a problem with session state, but I can't found how do works, even using an AJAX setItemInSessionState() function.

    The query depends on the values of the elements:
    select
         SPAT_ID, SPAT_ACCL_NAME, SPAT_AREA_NAME, SPAT_CLASS, SPAT_NUMBER, SPAT_PT, SPAT_TYPE, SPAT_STATUS,
         round(SPAT_CUMUL,2) as "SPAT_CUMUL"
    from
         SPATIAL_POINTS
    where
         upper(SPAT_AREA_NAME) LIKE upper(:P3_FILTRE_AREA_NAME)
    AND upper(SPAT_CLASS) LIKE '%'||upper(:P3_SPATIAL_CLASS)||'%'
    AND upper(SPAT_NUMBER) LIKE '%'||upper(:P3_FILTRE_NUMBER)||'%'
    AND instr(upper(:P3_SPATIAL_POINT_VALUES),upper(nvl(SPAT_PT,' '))) > 0
    AND instr(upper(:P3_SPATIAL_TYPE_VALUES),upper(SPAT_TYPE)) > 0
    AND (:P3_FILTRE_ACC_NAME IS NULL AND spat_accl_name IS NULL OR CASE WHEN :P3_FILTRE_ACC_NAME = '%' THEN nvl(spat_accl_name,'_NULL_') ELSE :P3_FILTRE_ACC_NAME END = nvl(spat_accl_name,'_NULL_'))
    I've implemented on apex.oracle.com, if you find the time to take a look: http://apex.oracle.com/pls/apex/f?p=4550:1
    You should get a "no data found" the first time the page loaded.

    Workspace : yb202826
    login : User1
    password : u_s_e_r_1
    application : 20588. Page 1 of the Geode

    Thank you!

    Yann.

    This problem is described here:

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

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

  • Why the rich text editor shows unsupported data type?

    Hello

    I used the rich text editor in my application (for the message box). I used the data BLOB to the type. But, when I click on the button send it shows invalid hexadecimal number and also in back-end, it shows the data type not supported. Why is it so? Need your help.

    --

    Thank you.

    Venky_prs wrote:

    Thanks for the reply. I changed on the CLOB type. Now, the intervention process. But, in the back-end the message column contains HTML format. For this rich text editor, I used the source as the database column type. How can I get the actual message instead of the html format.

    Elements of the rich text editor are used to create HTML text. If you need/want data plain text, then use a Textarea base element.

  • When I try to change the interactive report columns, then triggers the error: "unable to change column attributes. "ORA-01403: no data found. Pls tell me why?

    When I try to change the interactive report columns, then triggers the error: "unable to change column attributes. "ORA-01403: no data found. Pls tell me why?

    You use listener EA3 ADR?

  • "Name of file or assembly ' System.Windows.Forms, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = B77A5C561934E089", or one of its dependencies was not found

    Hello

    Im having a problem. I write a program in Visual studio 2008 c# for Windows CE language in a machine of liliput.

    When I run the program in windows 7, I have no problem, but when I try to run my program in Windows CE I get the following exception (the projecto for Windows CE was created to run in this operating system):

    MissingMethodException is unmanaged

    "Name of file or assembly ' System.Windows.Forms, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = B77A5C561934E089", or one of its dependencies was not found.

    The references from my program are:

    mscorlib.dll (Version 2.0.0.0) (length versio 2.0.0.0) - this dll do not exist in the program for Windows 7, appeared when I created the project for windows CE

    NationalInstruments.Vision.dll (Version 11.0.35.102)

    NationInstruments.Vision.Common.dll (Version 11.0.35.102)

    System.dll (Version 2.0.0.0)

    System.Data.dll (Version 2.0.0.0)

    System.Deployment.dll (Version 2.0.0.0)

    (Version 2.0.0.0)-System.Drawing.dll

    System.Windows.Forms.dll (Version 2.0.0.0)

    System.XML.dll (Verision 2.0.0.0)

    Throughout this reference is the Version of the Runtime: v2.0.50727 (it is the versions of Windows CE of liliput machine can run?)

    Can someone help me? I don't know why I get this exception

    Thank you for your help

    Hello UH and thank you for your message.

    I'm sorry I don't really understand what you are doing, you develop applications with Visual Studio 2008 and then deploy it on Windows CE or use directly in windows THIS? (I ask that, because Visual Studio is not supported on Windows CE: http://www.microsoft.com/en-us/download/details.aspx?id=7940)

    In addition, what device OR do you use? What is the fat of your project?

    Thanks for the responses,

  • No data found Trigger error (before or after)

    Dear all,

    We have the trigger in the database, whenever we try to insert the record in WIP_OPERATIONS, NO DATA FOUND exception was thrown, when debugging we, we have found no problem. The first select statement is getting has not, even if there is the value entered for: NEW.wip_entity_id and when we execute the query separately in the database with the: NEW. WIP_ENTITY_ID, its getting the value. What could be the reason? We cannot use statement SELECT AFTER or BEFORE INSERT trigger? No idea why its NO_DATA_FOUND Exception throw?

    CREATE OR REPLACE TRIGGER sdm_brasil_wj_ops_iface_trg
    BEFORE YOU INSERT OR REMOVE
    ON WIP_OPERATIONS
    SEO
    AGAIN LIKE NEW
    OLD OLD
    FOR EACH LINE
    DECLARE
    ln_status NUMBER (10): = 0;
    ln_item_id Number (20);
    --
    lc_txn_type VARCHAR2 (1);
    v_interface_flag VARCHAR2 (1);
    v_err_msg VARCHAR2 (2000): = NULL;
    v_error VARCHAR2 (2000): = NULL;
    --
    lb_insert_iface BOOLEAN: = FALSE;
    --
    lr_discrete_job_ops wip_operations % ROWTYPE: = NULL;
    --
    BEGIN

    lr_discrete_job_ops.wip_entity_id: =: NEW.wip_entity_id;

    BEGIN

    INSERT INTO APPS. The VALUES of XX_TEMP (': NEW.wip_entity_id ' |: NEW.wip_entity_id);

    SELECT status_type
    IN ln_status
    OF wip_discrete_jobs
    WHERE wip_entity_id =: NEW.wip_entity_id;


    INSERT INTO APPS. The XX_TEMP VALUES ('ln_status' | ln_status);

    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    ln_status: = 0;
    v_error: = ' ERR001: NO DATA FOUND - primary item for WJ ID Id: ' | To_char (lr_discrete_job_ops.wip_entity_id): ' = > ' | SUBSTR (SQLERRM, 1, 500);
    dbg_pk.appmsg (1, vn | v_error);
    WHEN TOO_MANY_ROWS THEN
    ln_status: = 1;
    v_error: = ' ERR001: TOO Manu Rows: primary item for WJ ID Id: ' | To_char (lr_discrete_job_ops.wip_entity_id): ' = > ' | SUBSTR (SQLERRM, 1, 500);
    dbg_pk.appmsg (1, vn | v_error);
    WHILE OTHERS THEN
    ln_status: = 2;
    v_error: = ' ERR001: other - of the primary item for WJ ID Id: ' | To_char (lr_discrete_job_ops.wip_entity_id): ' = > ' | SUBSTR (SQLERRM, 1, 500);
    dbg_pk.appmsg (1, vn | v_error);
    END;

    932450 wrote:
    Hi Blushadow,

    Thanks for the reply, even I thought that the select statement is get executed before recording is committed to the database.

    How we can know, determine if the data enters the wip_discrete_jobs table?

    He didn't necessarily need to be committed, but it must have been inserted in the same session.
    The NO_DATA_FOUND error would seem to indicate that the trigger on the table wip_operations is put to fire until the data is inserted at wip_discrete_jobs. We have all your code, we are unable to identify the exact location of the error.

  • Why always show that "there is a connection to the Apple store error."? It has been a month I am facing such a problem. How can I fix? Hope you have a solution to this...

    Why always show that "there is a connection to the Apple store error."? It has been a month I am facing such a problem. How can I fix? Hope you have a solution to this...

    I don't know if this is the problem, but it is something that must be correct establish a secure connection:

    Open Date and time preferences system, Date & time tab. Make sure that it is set to automatically set the time.

    Alternatively, make sure that your date/time is correctly set to the second.

    Another thing to try is to restart your modem and router.

  • When I start my windows 7 laptop its showing two same username, but I don't see a single user, if I guset user also show two guset user

    When I start my windows 7 laptop its showing two same username, but I don't see a single user, if I guset user also show two guset user

    Hello

    I suggest you analyze your computer Microsoft Safety Scanner, it will help us to get rid of viruses, spyware and other malicious software.

    The Microsoft Security Scanner is a downloadable security tool for free which allows analysis at the application and helps remove viruses, spyware and other malware. It works with your current antivirus software.

    http://www.Microsoft.com/security/scanner/en-us/default.aspx

    Note: The Microsoft Safety Scanner ends 10 days after being downloaded. To restart a scan with the latest definitions of anti-malware, download and run the Microsoft Safety Scanner again.

    Note: The data files that are infected must be cleaned only by removing the file completely, which means that there is a risk of data loss.

    More information: Difficulty of a corrupt user profile: http://windows.microsoft.com/en-US/windows7/Fix-a-corrupted-user-profile

    Hope this information is useful.

  • DBCA SHOWING NO DATA AND FRA... Help, please?

    Hi, I was trying the new installation of Oracle 11 g. Executing command (DBCA), to the DATA CONFIGURATION WIZARD, step 6 of 12: location of the database files. In the database box, I click to BROSE BUTTON but it does not show DATA or FRA. You will find the attached screenshot for more clear.

    databasearea.png

    PROBLEM WAS SOLVED... because we know that /dev/raw / * must contain the ORACLE as USER AND OINSTALL as a GROUP in order to distribute the ASM for DATA and FRA... No ONE including ME REMARQUERAIT the USER AND GROUP that I presented above. I am again submitting the above information here as well, or you can check the same information [root@example dev] # ls - ld/dev/raw / * of the above. So this is what the user and group was before. Because to show DATA AND FRA drive to the title of the ASM, the/dev/RAW/expected to be under ORACLE as USER AND OINSTALL as GROUP but before /dev/raw / * was under ROOT as USER and DRIVE as a GROUP and because of this it was not showing the DATA and FRA assigned disk while using the DBCA COMMAND

    [root@example dev] # ls - ld/dev/raw / *.

    CRW - rw-. 1 root disk 162, 1 Jan 29 21:29 / dev/raw/raw1

    CRW - rw-. 1 root disk 162, 2 Jan 29 21:29 / dev/raw/raw2

    CRW - rw-. 1 root disk 162, 3 Jan 29 21:29 / dev/raw/raw3

    CRW - rw-. 1 root disk 162, 4 Jan 29 21:29 / dev/raw/raw4

    CRW - rw-. 1 root disk 162, 5 Jan 29 21:29 / dev/raw/raw5

    CRW - rw-. 1 root disk 162, 6 Jan 29 21:29 / dev/raw/raw6

    CRW - rw-. 1 oracle oinstall 162, 0 Jan 29 21:29 / dev/raw/rawctl

    THE MAIN PROBLEM in MY CASE WAS ON AFTER, if you give OR type chown-r oracle: oinstall/dev/raw, chmod 770/dev/raw, chmod 660/dev/raw/raw * MANUALLY then it will display the correct GROUPS and USERS

    [root@example Desktop] # chown r oracle: oinstall/dev/raw

    [root@example Desktop] # chmod 770/dev/raw

    [root@example Desktop] # chmod 660/dev/raw/raw *.

    [root@example Desktop] # ls - ld/dev/raw / *.

    CRW - rw-. 1 oracle oinstall 162, 1 Jan 30 09:35 / dev/raw/raw1

    CRW - rw-. 1 oracle oinstall 162, 2 Jan 30 09:35 / dev/raw/raw2

    CRW - rw-. 1 oracle oinstall 162, 3 Jan 30 09:35 / dev/raw/raw3

    CRW - rw-. 1 oracle oinstall 162, 4 Jan 30 09:35 / dev/raw/raw4

    CRW - rw-. 1 oracle oinstall 162, 5 Jan 30 09:35 / dev/raw/raw5

    CRW - rw-. 1 oracle oinstall 162, 6. Jan 30 09:35 / dev/raw/raw6

    CRW - rw-. 1 oracle oinstall 162, 0 Jan 30 09:16 / dev/raw/rawctl

    [root@example Desktop] #.

    WHILE

    If you the same things chown-r oracle: oinstall/dev/raw, chmod 770/dev/raw, chmod 660/dev/raw/raw * in /etc/rc.d/rc.local then it shows USERS and DRIVE as root and disc.

    [root@example ~] vi /etc/rc.d/rc.local

    ! / bin/sh

    #

    # This script will be executed * after * all the other init scripts.

    # You can put your own stuff of initialization here if you do not

    # want to do the full Sys V style init stuff.

    touch/var/lock/subsys/local

    / dev/raw/raw1 gross/dev/sda11

    / dev/raw/raw2 gross/dev/sda12

    / dev/raw/raw3 gross/dev/sda13

    / dev/raw/raw4 gross/dev/sda14

    / dev/raw/raw5 gross/dev/sda15

    / dev/raw/raw6 gross/dev/sda16

    chown-r oracle: oinstall/dev/raw

    chmod 770/dev/raw

    chmod 660/dev/raw/raw *.

    [root@example dev] # reboot or refresh

    AFTER THEN AGAIN if YOU CHECK the USER AND the GROUP using ls - ld/dev/raw / * then his root watch and the disk commands as the user and group. It shows the root and the disc where it should be ORACLE and OINSTALL under USERS and GROUPS. I couldn't find the reason why even after put chown-r oracle: oinstall/dev/raw, chmod 770/dev/raw, chmod 660/dev/raw/raw * shows the wrong USER AND GROUP?

    [root@example dev] # ls - ld/dev/raw / *.

    CRW - rw-. 1 root disk 162, 1 Jan 29 21:29 / dev/raw/raw1

    CRW - rw-. 1 root disk 162, 2 Jan 29 21:29 / dev/raw/raw2

    CRW - rw-. 1 root disk 162, 3 Jan 29 21:29 / dev/raw/raw3

    CRW - rw-. 1 root disk 162, 4 Jan 29 21:29 / dev/raw/raw4

    CRW - rw-. 1 root disk 162, 5 Jan 29 21:29 / dev/raw/raw5

    CRW - rw-. 1 root disk 162, 6 Jan 29 21:29 / dev/raw/raw6

    CRW - rw-. 1 oracle oinstall 162, 0 Jan 29 21:29 / dev/raw/rawctl

    SO HERE'S WHAT I DID... THE SOLUTION WORKING for me is that I created the shell script file named test.sh.

    STEP 1: CREATE the SHELL SCRIPT FILE test.sh

    [root@example Desktop] # cat /root/test.sh

    chown-r oracle: oinstall/dev/raw

    chmod 770/dev/raw

    chmod 660/dev/raw/raw *.

    STEP 2: Place rc.local file test.sh

    [root@example ~] vi /etc/rc.d/rc.local

    ! / bin/sh

    #

    # This script will be executed * after * all the other init scripts.

    # You can put your own stuff of initialization here if you do not

    # want to do the full Sys V style init stuff.

    touch/var/lock/subsys/local

    / dev/raw/raw1 gross/dev/sda11

    / dev/raw/raw2 gross/dev/sda12

    / dev/raw/raw3 gross/dev/sda13

    / dev/raw/raw4 gross/dev/sda14

    / dev/raw/raw5 gross/dev/sda15

    / dev/raw/raw6 gross/dev/sda16

    /root/test.sh

    STEP 3: REFRESH rc.local or you can RESTART the pc once more

    [root@example Desktop] # /etc/rc.d/rc.local

    STEP 4: CHECK the USERS and GROUPS as mentioned below: -.

    [root@example Desktop] # ls - ld/dev/raw / *.

    CRW - rw-. 1 oracle oinstall 162, 1 Jan 30 09:35 / dev/raw/raw1

    CRW - rw-. 1 oracle oinstall 162, 2 Jan 30 09:35 / dev/raw/raw2

    CRW - rw-. 1 oracle oinstall 162, 3 Jan 30 09:35 / dev/raw/raw3

    CRW - rw-. 1 oracle oinstall 162, 4 Jan 30 09:35 / dev/raw/raw4

    CRW - rw-. 1 oracle oinstall 162, 5 Jan 30 09:35 / dev/raw/raw5

    CRW - rw-. 1 oracle oinstall 162, 6. Jan 30 09:35 / dev/raw/raw6

    CRW - rw-. 1 oracle oinstall 162, 0 Jan 30 09:16 / dev/raw/rawctl

    [root@example Desktop] #.

    asmca $ [grid@example Desktop]

    DATA AND FRA PROBLEM SOLVED

  • report "no data found".

    Hello together,

    I use Apex 4.2.4 with a DB XE on Windows.

    I'm creating a mobile application.

    I created a report showing specific information from the user.

    Sometimes, it is possible that there is no information available. In this case the report displays the message/exception "no data found".

    Is there a solution to hide this message?

    My plan is to show only the data if they are available and show nothing when no data found.

    For the user, it should look like this, there is not a report if no data is available.

    I don't want to see the message "no data found".

    Thanks for your help

    Joe

    Joe_990933 wrote:

    I use Apex 4.2.4 with a DB XE on Windows.

    My plan is to show only the data if they are available and show nothing when no data found.

    For the user, it should look like this, there is not a report if no data is available.

    Control if the area of report is displayed using a Exists (SQL query returns at least one row) condition with a query that returns at least one row if the report contains data.

  • ORA-01403: no data found

    Hello

    The following procedure works fine when the select statement returns a line.
    However, it creates "ORA-01403: no data found" error when no data is returned for select.

    When I put the following exception after select it, It doest go inside the if block. (It stops after selection). Do not know why.
    exception
    when NO_DATA_FOUND then null;
    How can I set an exception for this?
    CREATE OR REPLACE PROCEDURE kill_blocking
    IS
    l_sid number(10); 
    l_serial number(10);
    l_wait number(10);
    l_username varchar2(20);
    sqlStmt VARCHAR2(1000);
    BEGIN
    
    SELECT s1.sid,s1.serial#,s2.seconds_in_wait,s2.username
    into l_sid,l_serial,l_wait,l_username
    FROM v$lock l1, v$session s1, v$lock l2,v$session s2,v$sql sqlt1, v$sql sqlt2
    WHERE s1.sid =l1.sid
    AND s2.sid =l2.sid AND sqlt1.sql_id= s2.sql_id AND sqlt2.sql_id= s1.prev_sql_id AND l1.BLOCK =1
    AND l2.request > 0 AND l1.id1 = l2.id1 AND l2.id2 = l2.id2;
    
    if l_username='APP' and l_wait > 100
    then 
    sqlStmt := 'ALTER SYSTEM KILL SESSION ''' || TO_CHAR(l_sid) ||',' || TO_CHAR(l_serial) ||'''' ;
    dbms_output.put_line( sqlStmt );
    
    EXECUTE IMMEDIATE sqlStmt;
    
    
    END IF;
    END;
    / 

    Check this box

    SQL> CREATE OR REPLACE PROCEDURE kill_blocking IS
      2     l_sid        NUMBER (10);
      3     l_serial     NUMBER (10);
      4     l_wait       NUMBER (10);
      5     l_username   VARCHAR2 (20);
      6     sqlstmt      VARCHAR2 (1000);
      7  BEGIN
      8     SELECT s1.SID, s1.serial#, s2.seconds_in_wait, s2.username
      9       INTO l_sid, l_serial, l_wait, l_username
     10       FROM v$lock l1,
     11            v$session s1,
     12            v$lock l2,
     13            v$session s2,
     14            v$sql sqlt1,
     15            v$sql sqlt2
     16      WHERE s1.SID = l1.SID
     17        AND s2.SID = l2.SID
     18        AND sqlt1.sql_id = s2.sql_id
     19        AND sqlt2.sql_id = s1.prev_sql_id
     20        AND l1.BLOCK = 1
     21        AND l2.request > 0
     22        AND l1.id1 = l2.id1
     23        AND l2.id2 = l2.id2;
     24
     25     IF l_username = 'APP' AND l_wait > 100
     26     THEN
     27        sqlstmt :=
     28              'ALTER SYSTEM KILL SESSION '''
     29           || TO_CHAR (l_sid)
     30           || ','
     31           || TO_CHAR (l_serial)
     32           || '''';
     33        DBMS_OUTPUT.put_line (sqlstmt);
     34
     35        EXECUTE IMMEDIATE sqlstmt;
     36     END IF;
     37  EXCEPTION
     38     WHEN NO_DATA_FOUND
     39     THEN
     40
     41        DBMS_OUTPUT.put_line ('No Data Found');
     42  END;
     43  /
    No Data Found
    
    PL/SQL procedure successfully completed.
    
  • No data found in report csv or pdf on first loading of the page

    No data found in report csv output on the first load of the page. Report appears on the page, but no data is available in csv or pdf output. I still need to send the page and then it shows the data in the downloads. The page contains a form (read-only) with a report that refers to 4 page elements by using something like the following:

    and b.employee_no = v ('P5_EMPLOYEE_NO')
    and c.fisc_year_pk = v ('P5_FISC_YEAR_PK')
    and b.job_class = v ('P5_JOB_CLASS')
    and b.organization = v ('P5_ORGANIZATION')

    Yet once again, report to page appears except there is no data in the downloads. Can someone help me solve this problem? I'm under Oracle APEX 4.2.1 in Oracle database 11 g 2.

    Thank you.

    Sounds like a question of classic session state.

    You must eat the page elements using calculations of page rendering to ensure they are set to session state.

    Or if the download is triggered by a button, you should check that the elements of the page are subject to session state, perhaps via an action of PL/SQL.

    Scott

  • Redirect when no data found

    Using Apex 4.1.1

    I need my application to redirect to another page when the user performs a search and there is no data found. The query in the report is too complicated and is a "Body of function from PL/SQL returning SQL query" and must be like that. It just does not work on its own.

    Initially, I tried to Javascript to run onLoad & run loading Page like:
    function redirect_on_no_data_found2()
    {
         
         // if user came from non-catalogue page
         if($(".nodatafound").html() == "no data found")
         {     
              redirect('f?p=129:8:'+$v('P1_SESSION_ID_VALUE')+':NO_DATA_FOUND:NO::');
         }
         
    }
    But javascript as it's too unreliable in IE 7, which is what users use and does not work in some cases while in others works.


    Is there another way I could do a redirect without javascript or using the APEX_APPLICATION.redirect procedure. Little short of ideas.

    Thank you very much.

    Hello

    I wrote this blog post where is also link to example
    http://dbswh.webhop.NET/HTMLDB/f?p=blog:read:0:article:6611800346018314

    I have test, you must use a fixed value as function APEX_UTIL. SAVEKEY_VC2 call parameter and select the double wrap.
    In this way, the function is called only once in the report query.

    Kind regards
    Jari
    -----
    My Blog: http://dbswh.webhop.net/htmldb/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

Maybe you are looking for