SQL cursor problem

Hi all

I want to see the records in the table emp or a message if the emp table is empty, but under cursor shows the two,

How can I solve this problem, please help.

declare
cursor emp_cur is
Select * from emp;
SheikYerbouti emp % rowtype;
Start
Open emp_cur;
loop
extract in SheikYerbouti emp_cur;
If emp_cur % notfound then
dbms_output.put_line ('there no record in the employee table');
"exit";
on the other
dbms_output.put_line (emp_rec.empno |) » '|| emp_rec.ename);
end if;
end loop;
close emp_cur;
end;

You should do something like this,

not tested.

DECLARE
   CURSOR emp_cur
   IS
      SELECT * FROM emp;

   emp_rec   emp%ROWTYPE;
   i         NUMBER := 0;
BEGIN

   IF emp_cur%ISOPEN THEN

      CLOSE emp_cur;

   END IF;

   OPEN emp_cur;

   LOOP

      FETCH emp_cur INTO emp_rec;

      EXIT WHEN emp_cur%NOTFOUND;

      i     := i + 1;

      DBMS_OUTPUT.PUT_LINE (emp_rec.empno || ' ' || emp_rec.ename);

   END LOOP;

   IF i = 0 THEN
      DBMS_OUTPUT.PUT_LINE ('There is no record in employee table ');
   END IF;

   CLOSE emp_cur;

END;

Earlier you were printing that the records did not exist for when the extraction fails. Extraction fails at the end of the recording for any cursor. If you have found the two.
Now, you print it out only if message I = 0, which means that the cursor did not return a single record.

G.

Tags: Database

Similar Questions

  • Pl/sql cursor - problem

    Hi all
    can someone explain how we can do this... goes is the structure of the table

    JAME & gt; Select * from addrep;

    EMPID ENAME SALARY
    -------- ------ ----------
    ROO1 TEST1 20000
    RO02 TEST2 30000
    RO03 TEST3 40000

    My media is, after giving the stmt delete on addrep, I insert all the data which is present at
    addrep table to another table called audit_addrep, below is the struct tab.

    JAME & gt; DESC AUDIT_ADDREP
    Name Null? Type
    ----------- -------- -----------------
    VARCHAR2 COLUMN (20)
    TABLE-NAME VARCHAR2 (20)
    OLD_VALUE VARCHAR2 (20)
    NEW_VALUE BY VARCHAR2 (30)

    I wrote plsql cursor and I take the name of the user_tab_cols column, but I can't properly
    Insert the data into the audit_addrep...

    audit_addrep table must contain data as below:

    Select * from audit_addrep;

    column-name table-name old_value new_value
    -------------------------------------
    addrep EmpID - R001
    Ename addrep test1-
    salary addrep - 20000
    addrep EmpID - R002
    Ename addrep test2-
    salary addrep - 30000
    addrep EmpID - R003
    Ename addrep test3-
    addrep - 40000 salary

    Please do the needfull-thing...

    Kind regards

    Jame

    Note: I can not align correctly, I donno how to do that (its not not given space)

    Case 3 (Ready to blow...)

    satyaki>
    satyaki>@D:\Interface.sql
     Enter DML String:insert into emp values(7777,''SOURAV'',''SLS'',null,sysdate,45000,3400,10)
     Enter Table Name Where The Above DML Will Take Place:emp
    Elapsed: 00:00:00.15
    satyaki>
    satyaki>
    satyaki>select * from emp;
    
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
    ---------- ---------- --------- ---------- --------- ---------- ---------- ----------
          7777 SOURAV     SLS                  14-SEP-08      45000       3400         10
          8888 BILLY      SC                   14-SEP-08      50000       5000         20
          7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-81       4450                    10
          7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
          7839 KING       PRESIDENT            17-NOV-81       7000                    10
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
    
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
    ---------- ---------- --------- ---------- --------- ---------- ---------- ----------
          7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
          9999 Satyaki    SC                   13-SEP-08      20000        400         30
    Elapsed: 00:00:00.17
    satyaki>
    satyaki>
    satyaki>select * from aud_del;
    
    COL_NAME                                 TAB_NAME                                           OLD_VALUE               
    
           NEW_VALUE
    ---------------------------------------- -------------------------------------------------- --------
    EMPNO                                    emp                                                                        
    
           7777
    ENAME                                    emp                                                                        
    
           SOURAV
    JOB                                      emp                                                                        
    
           SLS
    MGR                                      emp                                                                        
    
    HIREDATE                                 emp                                                                        
    
           14-SEP-08
    SAL                                      emp                                                                        
    
           45000
    COMM                                     emp                                                                        
    
           3400
    DEPTNO                                   emp                                                                        
    
           10
    Elapsed: 00:00:00.12
    satyaki>
    satyaki>
    satyaki>@D:\Interface.sql
     Enter DML String:delete from emp where empno between 7777 and 10000 and job like ''SC%''
     Enter Table Name Where The Above DML Will Take Place:emp
    Elapsed: 00:00:00.21
    satyaki>
    satyaki>
    satyaki>select * from emp;
    
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
    ---------- ---------- --------- ---------- --------- ---------- ---------- ----------
          7777 SOURAV     SLS                  14-SEP-08      45000       3400         10
          7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-81       4450                    10
          7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
          7839 KING       PRESIDENT            17-NOV-81       7000                    10
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
          7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
    
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
    ---------- ---------- --------- ---------- --------- ---------- ---------- ----------
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
    Elapsed: 00:00:00.19
    satyaki>
    satyaki>
    satyaki>select * from aud_del;
    
    COL_NAME                                 TAB_NAME                                           OLD_VALUE               
    
           NEW_VALUE
    ---------------------------------------- -------------------------------------------------- --------
    EMPNO                                    emp                                                                        
    
           7777
    ENAME                                    emp                                                                        
    
           SOURAV
    JOB                                      emp                                                                        
    
           SLS
    MGR                                      emp                                                                        
    
    HIREDATE                                 emp                                                                        
    
           14-SEP-08
    SAL                                      emp                                                                        
    
           45000
    COMM                                     emp                                                                        
    
           3400
    DEPTNO                                   emp                                                                        
    
           10
    EMPNO                                    emp                                                8888                    
    
    ENAME                                    emp                                                BILLY                   
    
    JOB                                      emp                                                SC                      
    
    COL_NAME                                 TAB_NAME                                           OLD_VALUE               
    
           NEW_VALUE
    ---------------------------------------- -------------------------------------------------- --------
    MGR                                      emp                                                                        
    
    HIREDATE                                 emp                                                14-SEP-08               
    
    SAL                                      emp                                                50000                   
    
    COMM                                     emp                                                5000                    
    
    DEPTNO                                   emp                                                20                      
    
    EMPNO                                    emp                                                9999                    
    
    ENAME                                    emp                                                Satyaki                 
    
    JOB                                      emp                                                SC                      
    
    MGR                                      emp                                                                        
    
    HIREDATE                                 emp                                                13-SEP-08               
    
    SAL                                      emp                                                20000                   
    
    COL_NAME                                 TAB_NAME                                           OLD_VALUE               
    
           NEW_VALUE
    ---------------------------------------- -------------------------------------------------- --------
    COMM                                     emp                                                400                     
    
    DEPTNO                                   emp                                                30                      
    
    Elapsed: 00:00:00.29
    satyaki>
    satyaki>
    

    Continue...

    Kind regards.

    LOULOU.

  • Mouse cursor problem

    After a few hours, my mouse cursor gets... weird. She becomes a fatter version of himself (in his goal a bit biased as well) with multiple copies, overlapping itself in different colors. The cursor "hovering on the text" is not affected, its 'I' used remaining shape, but others, including the slider "arrow" by default and the "hovering on the hyperlink pointing to the hand" is weird. Turning on the traces of the mouse leaves a copy of the weird arrow cursor, but the normal mouse comes back and works well.

    So, basically, how to avoid this strange, large, multicolored, slider which came into existence, and the case of activation of the traces of the mouse * is * the only way to turn it off, how can I get rid of the weird, big, multicolored cursor unsightly that lingers on my screen? Virus scan has not turned up all wicked. Would it be a specific program (it's a gaming computer and not all games are perfect...) which irritates my computer in a certain way and results do?

    NOTE: I use a special gaming mouse or anything like that. It's a Dell which came with a (different) computer that I got years ago. Device Manager indicates that the drivers are up to date. I don't think it's a problem with this mouse especially, but I have no real way to check a different mouse on this computer without having to buy one.

    Thanks for reading.

    I'd be willing to bet that it's your video card driver.  My Dell has an ATI video card and it happens sometimes.  I have a graphics card dual monitor and oddly enough happens that on my primary monitor - display of the cursor on the screen 2 is not affected.

    ATI made a patch for cursor problems, unfortunately the Dell that I use is in a corporate environment and they did not find enough critical to give me the patch again.

    You could try the Dell support page, go to the downloads section and make sure you have the latest video card driver.

  • Focus cursor problem: I can't get my cursor will appear in a search box

    Original title: Focus cursor problem

    I can't get my cursor will appear in a search box (e.g., Google, amazon.com, etc.) in Firefox Version 16.  It seems to be a kind of focus problem.  Is it a Firefox problem or a problem of Windows 7?  Could this be a script problem?  Thanks for any ideas on how to solve this problem.

    Hi Letaiyo,

    You are welcome.

    I am happy to learn that the problem is solved!

    Your efforts to solve this problem is appreciated.

    Thank you for sharing your information on the way in which you solved the problem.

    In the future if you fall on any question relating to Windows, please do not hesitate to post your request here on Microsoft Community, we will be more than happy to help you.

    Thank you.
  • java.sql.SQLException: problems with the native/lack of loading methods library

    Hi all

    Please let me know how to fix the exception "java.sql.SQLException: problems with the native/lack of loading methods library: no ttJdbc in java.library.path".

    Thank you
    Prabhu

    Published by: Nina Prabhu on November 20, 2012 02:12

    Hi Prabhu,

    Probably, you must specify the LD_LIBRARY_PATH variable. Like the following:

    export LD_LIBRARY_PATH=$TIMESTEN_HOME/ttoracle_home/instantclient_11_1
    

    Best regards
    Gennady

  • Same mistake again - ORA-06511: PL/SQL: cursor already opened

    Hello

    Even if I close the cursor, I get the following error "ORA-06511-6511: PL/SQL: cursor already opened. Please can you give your suggestion.

    CUR CURSOR IS
    JULIE name FROM test;

    BEGIN

    IF heart % ISOPEN THEN
    CLOSE cur
    END IF;

    Heart OPEN;

    FOR my heart IN cuv
    LOOP
    -sql statements
    END LOOP;

    END;

    Published by: AravindhK on December 6, 2011 13:56

    Do not open cursors when you write

    For  in 
    loop
    
    SQL> Declare
    CURSOR cur IS
    SELECT 1 A FROM dual;
    BEGIN
    IF cur%ISOPEN THEN
    CLOSE cur;
    END IF;
    --OPEN cur;
    DBMS_OUTPUT.PUT_LINE('Cursor opened by for');
    FOR cuv IN cur
    LOOP
    DBMS_OUTPUT.PUT_LINE(cuv.A);
    END LOOP;
    END;
    
    Cursor opened by for
    1
    
    PL/SQL procedure successfully completed.
    
  • Parsing sql - cursor parent and child

    Hi all

    What is the parent and child when parsing sql cursor?

    Thank you

    John

    Well, as Anand mentioned you could yourself. Here's a demo of the workaround based. Based on the change of environment, the sliders would be created and will not be shared that I made using the change of parameter of optimizer_mode. This is done in 11201 with the setting optimizer_features_enable on 10201.

    SQL> drop table t purge;
    
    Table dropped.
    
    SQL> select sql_text from V$sqlarea where sql_text like 'select * from t%';
    
    SQL_TEXT
    --------------------------------------------------------------------------------
    select * from t
    
    SQL> alter system flush shared_pool;
    
    System altered.
    
    SQL> select sql_text from V$sqlarea where sql_text like 'select * from t%';
    
    no rows selected
    
    SQL> save a
    Created file a.sql
    SQL> select * from t;
    select * from t
                  *
    ERROR at line 1:
    ORA-00942: table or view does not exist
    
    SQL> create table t(a char);
    
    Table created.
    
    SQL> select * from t;
    
    no rows selected
    
    SQL> select sql_text from V$sqlarea where sql_text like 'select * from t%';
    
    SQL_TEXT
    --------------------------------------------------------------------------------
    select * from t
    
    SQL> select * from T;
    
    no rows selected
    
    SQL> select sql_text from V$sqlarea where sql_text like 'select * from t%';
    
    SQL_TEXT
    --------------------------------------------------------------------------------
    select * from t
    
    SQL> select sql_text from V$sqlarea where sql_text like 'select * from t%' or sql_text like 'select * from T%';
    
    SQL_TEXT
    --------------------------------------------------------------------------------
    select * from t
    select * from T
    
    SQL> select sql_text,version_count, executions from V$sqlarea where sql_text like 'select * from t%' or sql_text like 'select * from T%';
    
    SQL_TEXT
    --------------------------------------------------------------------------------
    VERSION_COUNT EXECUTIONS
    ------------- ----------
    select * from t
                1          1
    
    select * from T
                1          1
    
    SQL> column sql_text format a40
    SQL> /
    
    SQL_TEXT                                 VERSION_COUNT EXECUTIONS
    ---------------------------------------- ------------- ----------
    select * from t                                      1          1
    select * from T                                      1          1
    
    SQL> select * from T;
    
    no rows selected
    
    SQL> select sql_text from V$sqlarea where sql_text like 'select * from t%' or sql_text like 'select * from T%';
    
    SQL_TEXT
    ----------------------------------------
    select * from t
    select * from T
    
    SQL> select sql_text,version_count, executions from V$sqlarea where sql_text like 'select * from t%' or sql_text like 'select * from T%';
    
    SQL_TEXT                                 VERSION_COUNT EXECUTIONS
    ---------------------------------------- ------------- ----------
    select * from t                                      1          1
    select * from T                                      1          2
    
    SQL> alter session set optimizer_mode=first_rows;
    
    Session altered.
    
    SQL> select * from T;
    
    no rows selected
    
    SQL> select * from t;
    
    no rows selected
    
    SQL> select sql_text,version_count, executions from V$sqlarea where sql_text like 'select * from t%' or sql_text like 'select * from T%';
    
    SQL_TEXT                                 VERSION_COUNT EXECUTIONS
    ---------------------------------------- ------------- ----------
    select * from t                                      1          1
    select * from test_sharing where id=:a               1          3
    select * from test_sharing where id=1                1          0
    select * from test_sharing where id=99               1          0
    select * from T                                      2          3
    
    SQL> select sql_text, child_number, optimizer_mode, plan_hash_value from V$sql where sql_text like 'select * from t%' or sql_text like 'select * fro
    
    SQL_TEXT                                 CHILD_NUMBER OPTIMIZER_ PLAN_HASH_VALUE
    ---------------------------------------- ------------ ---------- ---------------
    select * from t                                     0 FIRST_ROWS      1601196873
    select * from test_sharing where id=:a              0 ALL_ROWS        3492249339
    select * from test_sharing where id=1               0 ALL_ROWS        3492249339
    select * from test_sharing where id=99              0 ALL_ROWS        2354865636
    select * from T                                     0 ALL_ROWS        1601196873
    select * from T                                     1 FIRST_ROWS      1601196873
    
    6 rows selected.
    
    SQL> alter session set optimizer_mode=first_rows_1;
    
    Session altered.
    
    SQL> select * from t;
    
    no rows selected
    
    SQL> select * from T;
    
    no rows selected
    
    SQL> select sql_text, child_number, optimizer_mode, plan_hash_value from V$sql where sql_text like 'select * from t%' or sql_text like 'select * fro
    
    SQL_TEXT                                 CHILD_NUMBER OPTIMIZER_ PLAN_HASH_VALUE
    ---------------------------------------- ------------ ---------- ---------------
    select * from t                                     0 FIRST_ROWS      1601196873
    select * from test_sharing where id=:a              0 ALL_ROWS        3492249339
    select * from test_sharing where id=1               0 ALL_ROWS        3492249339
    select * from test_sharing where id=99              0 ALL_ROWS        2354865636
    select * from T                                     0 ALL_ROWS        1601196873
    select * from T                                     1 FIRST_ROWS      1601196873
    
    6 rows selected.
    
    SQL> alter session set sql_trace=true;
    
    Session altered.
    
    SQL> alter session set optimizer_mode=first_rows_1;
    
    Session altered.
    
    SQL> select * from t;
    
    no rows selected
    
    SQL> select * from T;
    
    no rows selected
    
    SQL> select sql_text,version_count, executions from V$sqlarea where sql_text like 'select * from t%' or sql_text like 'select * from T%';
    
    SQL_TEXT                                 VERSION_COUNT EXECUTIONS
    ---------------------------------------- ------------- ----------
    select * from t                                      2          3
    select * from test_sharing where id=:a               1          3
    select * from test_sharing where id=1                1          0
    select * from test_sharing where id=99               1          0
    select * from T                                      3          5
    
    SQL> select sql_text, child_number, optimizer_mode, plan_hash_value from V$sql where sql_text like 'select * from t%' or sql_text like 'select * fro
    
    SQL_TEXT                                 CHILD_NUMBER OPTIMIZER_ PLAN_HASH_VALUE
    ---------------------------------------- ------------ ---------- ---------------
    select * from t                                     0 FIRST_ROWS      1601196873
    select * from t                                     1 FIRST_ROWS      1601196873
    select * from test_sharing where id=:a              0 ALL_ROWS        3492249339
    select * from test_sharing where id=1               0 ALL_ROWS        3492249339
    select * from test_sharing where id=99              0 ALL_ROWS        2354865636
    select * from T                                     0 ALL_ROWS        1601196873
    select * from T                                     1 FIRST_ROWS      1601196873
    select * from T                                     2 FIRST_ROWS      1601196873
    
    8 rows selected.
    
    SQL> select sql_id,sql_text, child_number, optimizer_mode, plan_hash_value from V$sql where sql_text like 'select * from t%' or sql_text like 'selec
    
    SQL_ID        SQL_TEXT                                 CHILD_NUMBER OPTIMIZER_
    ------------- ---------------------------------------- ------------ ----------
    PLAN_HASH_VALUE
    ---------------
    89km4qj1thh13 select * from t                                     0 FIRST_ROWS
         1601196873
    
    89km4qj1thh13 select * from t                                     1 FIRST_ROWS
         1601196873
    
    7gbgb5nzcdcf3 select * from test_sharing where id=:a              0 ALL_ROWS
         3492249339
    
    SQL_ID        SQL_TEXT                                 CHILD_NUMBER OPTIMIZER_
    ------------- ---------------------------------------- ------------ ----------
    PLAN_HASH_VALUE
    ---------------
    0890tcnrf5jsv select * from test_sharing where id=1               0 ALL_ROWS
         3492249339
    
    7hg3cujy0ya0r select * from test_sharing where id=99              0 ALL_ROWS
         2354865636
    
    ahgbnyrbh7bp1 select * from T                                     0 ALL_ROWS
         1601196873
    
    SQL_ID        SQL_TEXT                                 CHILD_NUMBER OPTIMIZER_
    ------------- ---------------------------------------- ------------ ----------
    PLAN_HASH_VALUE
    ---------------
    ahgbnyrbh7bp1 select * from T                                     1 FIRST_ROWS
         1601196873
    
    ahgbnyrbh7bp1 select * from T                                     2 FIRST_ROWS
         1601196873
    
    8 rows selected.
    
    SQL> set pagesize 9999
    SQL> /
    
    SQL_ID        SQL_TEXT                                 CHILD_NUMBER OPTIMIZER_
    ------------- ---------------------------------------- ------------ ----------
    PLAN_HASH_VALUE
    ---------------
    89km4qj1thh13 select * from t                                     0 FIRST_ROWS
         1601196873
    
    89km4qj1thh13 select * from t                                     1 FIRST_ROWS
         1601196873
    
    7gbgb5nzcdcf3 select * from test_sharing where id=:a              0 ALL_ROWS
         3492249339
    
    0890tcnrf5jsv select * from test_sharing where id=1               0 ALL_ROWS
         3492249339
    
    7hg3cujy0ya0r select * from test_sharing where id=99              0 ALL_ROWS
         2354865636
    
    ahgbnyrbh7bp1 select * from T                                     0 ALL_ROWS
         1601196873
    
    ahgbnyrbh7bp1 select * from T                                     1 FIRST_ROWS
         1601196873
    
    ahgbnyrbh7bp1 select * from T                                     2 FIRST_ROWS
         1601196873
    
    8 rows selected.
    
    SQL> set linesize 200
    SQL> /
    
    SQL_ID        SQL_TEXT                                 CHILD_NUMBER OPTIMIZER_ PLAN_HASH_VALUE
    ------------- ---------------------------------------- ------------ ---------- ---------------
    89km4qj1thh13 select * from t                                     0 FIRST_ROWS      1601196873
    89km4qj1thh13 select * from t                                     1 FIRST_ROWS      1601196873
    7gbgb5nzcdcf3 select * from test_sharing where id=:a              0 ALL_ROWS        3492249339
    0890tcnrf5jsv select * from test_sharing where id=1               0 ALL_ROWS        3492249339
    7hg3cujy0ya0r select * from test_sharing where id=99              0 ALL_ROWS        2354865636
    ahgbnyrbh7bp1 select * from T                                     0 ALL_ROWS        1601196873
    ahgbnyrbh7bp1 select * from T                                     1 FIRST_ROWS      1601196873
    ahgbnyrbh7bp1 select * from T                                     2 FIRST_ROWS      1601196873
    
    8 rows selected.
    
    SQL> select child_number, child_address, stats_row_mismatch, optimizer_mode_mismatch
      2  from v$sql_shared_cursor where sql_id='ahgbnyrbh7bp1';
    
    CHILD_NUMBER CHILD_AD S O
    ------------ -------- - -
               0 1A610050 N N
               1 1F148DA4 N Y
               2 1A630C90 Y N
    
    SQL>
    

    You can see an inconsistency in the optimizer_mode resulting in another creation of child cursor. You can try to use the parameter cursor_sharing similar value and bind variables that would also cause child several sliders to create. For the view V$ sql_shared_cursor, check the docs.

    HTH
    Aman...

    PS: Please don't bump up to the thread. This is not support so people are not forced to update immediately. All are volunteers so assume that they would update the thread as and when they have / get time to do.

  • Windows 7 displays the error message when you exit + cursor problem

    Two issues here. Phoshop CS5 on Wind 7 64-bit.

    Number of physical processors: 8
    Processor speed: 3073 MHz
    Built-in memory: 12279 MB
    Free memory: 9577 MB
    Memory available to Photoshop: 10934 MB
    Memory used by Photoshop: 80%
    Tile image size: 128K

    First issue is since the last update automatic Adobe (why fix what is not broken?) Whenever I go out now Photoshop I get the message "Server QT Adobe has stoped working" and sometimes when I go out the bridge. InDesign behaves as evil. I can no longer start a previous document in the file without ID Manager crashing on.

    The other is the sliders in the Clone and delete lose their advantage (become invisable) without any reason - well not quite. Noise Ninja crashed in Photoshop when I tried to use it. I reinstalled it and all is well. The issue of cursor seems to be intermittent but came back (for no reason), after that I reinstalled NN. I can't seem to change the cursor, no matter what I do. The problem now seriously affect how I work. Almost any return to Win XP, who ran perfectly in Photoshop CS5.

    Any help will be accepted with gratitude.

    Doug

    Cursor problems are known to be caused by outdated video drivers (nVidia).

    Assuming you have a nVidia (which model?) video card, go to their web site and download and install the latest video drivers for your card.

    Also, this could very well solve your crash.

    Don't forget the video drivers to apply the OpenGL system, on which Photoshop relies heavily.

    -Christmas

  • PL/SQL: cursor already open

    Hi all

    You people could help to resolve the error
    "PL/SQL: cursor already open '."

    Thanks in advance
     CREATE OR REPLACE FUNCTION get_row_lane_counts_text
     RETURN VARCHAR2
     IS
        my_row_counts_text      VARCHAR2(10000);
        my_row_counts_entry      VARCHAR2(10000);
        my_row_counts_pct_entry      VARCHAR2(10000);      
        my_row_count_total_text  VARCHAR2(10000);
        my_total            NUMBER(12);
        my_count_result     VARCHAR2(20);
     
        CURSOR row_counts_text IS
            SELECT 'edr_rpt_lane_by_class_package.gen_total_lane_count('
                            ||'lane_id, '
                            ||'direction_id, '
                            ||'interval_start_date_time, '
                            ||'interval_end_date_time, '
                            ||'range_low, '
                            ||'range_high, '
                            || site_lane_id || ', '                                        
                            || site_lane_id || ') "#'|| site_lane_id || '"'
              FROM edr_rpt_tmp_report_lanes     
          ORDER BY site_lane_id;
          
           CURSOR row_counts_pct_text IS
            SELECT 'edr_rpt_lane_by_class_package.gen_total_lane_count_pct('
                            ||'lane_id, '
                            ||'direction_id, '
                            ||'interval_start_date_time, '
                            ||'interval_end_date_time, '
                            ||'range_low, '
                            ||'range_high, '
                            || site_lane_id || ', '                                        
                            || site_lane_id || ') "#'|| site_lane_id || '%"'
              FROM edr_rpt_tmp_report_lanes     
          ORDER BY site_lane_id;
          
          
     
     BEGIN
     
       my_row_counts_text      := ''; 
       my_row_counts_entry     := '';
       my_row_counts_pct_entry := ''; 
      
       -- generate the speed ranges function calls
       OPEN row_counts_text;
       LOOP
     
         FETCH row_counts_text INTO my_row_counts_entry;
     
         EXIT WHEN row_counts_text%NOTFOUND;
         
              OPEN row_counts_pct_text;
            LOOP
     
                  FETCH row_counts_pct_text INTO my_row_counts_pct_entry;
     
                  EXIT WHEN row_counts_pct_text%NOTFOUND;
         
                 my_row_counts_text := my_row_counts_entry || ', ' || my_row_counts_pct_entry;
             
             END LOOP; 
             
            
        
       END LOOP;
       
         CLOSE row_counts_pct_text;
       
       CLOSE row_counts_text;
       
       
     
       RETURN my_row_counts_text;
       
     
     END;
     /

    Works fine for me...

    SQL > create table t1 (number, number of b).

    Table created.

    SQL > insert into t1 values (1,1);

    1 line of creation.

    SQL > commit;

    Validation complete.

    SQL > CREATE or REPLACE FUNCTION get_row_lane_counts_text
    2 RETURN VARCHAR2
    3 EAST
    4 my_row_counts_text VARCHAR2 (10000);
    5 my_row_counts_entry VARCHAR2 (10000);
    6 my_row_counts_pct_entry VARCHAR2 (10000);
    7 my_row_count_total_text VARCHAR2 (10000);
    8 my_total NUMBER (12);
    9 my_count_result VARCHAR2 (20);
    10
    11 row_counts_text of CURSOR IS
    12. SELECT one
    13 FROM t1;
    14
    15
    16
    17 row_counts_pct_text of CURSOR IS
    18 SELECT b
    19 FROM t1;
    20
    21
    22
    23
    24
    BEGIN 25
    26
    27
    28 my_row_counts_text: = ";
    29 my_row_counts_entry: = ";
    30 my_row_counts_pct_entry: = ";
    31
    32
    33 generates speed ranges function calls
    34 row_counts_text OPEN;
    LOOP 35
    36
    37
    38 FETCH row_counts_text INTO my_row_counts_entry;
    39
    40
    EXIT 41 WHEN row_counts_text % NOTFOUND;
    42
    43
    44 row_counts_pct_text OPEN;
    45 LOOP
    46
    47
    48 FETCH row_counts_pct_text INTO my_row_counts_pct_entry;
    49
    50
    EXIT 51 WHEN row_counts_pct_text % NOTFOUND;
    52
    53
    54 my_row_counts_text: = my_row_counts_entry | ', ' || my_row_counts_pct_entry;
    55
    56
    57 END LOOP;
    58
    59
    60 row_counts_pct_text CLOSE;
    61
    LOOP END 62;
    63
    64
    65
    66
    67
    68 row_counts_text CLOSE;
    69
    70
    71
    72
    73 my_row_counts_text RETURN;
    74
    75
    76
    END 77;
    78
    79.

    The function is created.

    SQL >

    SQL > select get_row_lane_counts_text() from double;

    GET_ROW_LANE_COUNTS_TEXT()
    --------------------------------------------------------------------------------
    1, 1

  • upgrade 9i Sql performance problems, 10 g

    I've heard several times sql performance problem if db upgrade, what is his fix, this problem SQLs appear in ADDM report with Advisor tunning/access sql to run & its suggestions bugs?

    PL see MOS Doc 466181.1 (10 g companion Upgrade) - this topic is covered in this document

    HTH
    Srini

  • PL/SQL: Cursor with list filling can do IF EXISTS on Table

    Here's my problem. The DB I work with is a database of events (network events). I have a task to take a list of nodes of 2600 and see whether these nodes exist in a set of events that would be with a certain WHERE clause. On my first pass, I did WHERE AND NŒUD clause in (list of 2600 nodes). Well you can put only 1,000 items in a list so I've divided into 3 reports and served while a UNION all between them. This used 15% of the resources of the db and ran for hours and the Group dba like me to find a better way. They would prefer that I use PL/SQL.

    I am new to pl/sql (but not programming or SQL). So the first thing I've done is just figure out how to get my list in a Varray, which I then went to a table because I couldn't find examples, after hours and hours of searching the Web,.
    referencing a Varray with SQL syntax.

    START CODE sample 1 *.
    DECLARE
    DECLARE
    TYPE NodeList IS TABLE OF VARCHAR2 (255);
    Node NodeList: = NodeList ('node1', node2', [.. .list of 2597 nodes..], 'node2600')

    BEGIN
    dbms_output. Enable (1000000);
    FOR i IN Nodes.FIRST... Nodes.LAST
    LOOP
    DBMS_OUTPUT. Put_line (' relevant points: ' |) Nodes (i));
    END LOOP;
    END
    END CODE Sample 1 *.

    The pseudo-code I'm envisioning goes something like this:

    IF one of these nodes (nodes of 2600 list),
    There are in the nodes for this WHERE clause (which is taken from the event db table).
    then print the records (of the events in the event db table) that contains the nodes (ie the list nodes).

    I think I found an example with 2 sliders, but I can't find this example once again. And anyway, I can't figure out how to get my list in a cursor. I have many examples of how to complete a cursor on a select statement against a database.

    I tried this but it did not work:
    START the CODE sample 2 *.
    DECLARE
    DECLARE
    TYPE NodeList IS TABLE OF VARCHAR2 (255);
    Node NodeList: = NodeList ('node1', node2', [.. .list of 2597 nodes..], 'node2600')

    CURSOR MOM_OVO_NODES IS
    SELECT the node
    OF NodeList
    ORDER BY node;

    BEGIN
    dbms_output. Enable (1000000);

    FOR nodelist_rec IN MOM_OVO_NODES
    LOOP
    dbms_output.put_line (' relevant nodes: ' | nodelist_rec.) Node);
    END LOOP;

    END
    END CODE sample 2 *.

    Is there a way to get this list in a slider? Or I think about this correctly?

    Brad

    Brad Bueche wrote:
    Here's my problem. The DB I work with is a database of events (network events). I have a task to take a list of nodes of 2600 and see whether these nodes exist in a set of events that would be with a certain WHERE clause. On my first pass, I did WHERE AND NŒUD clause in (list of 2600 nodes). Well you can put only 1,000 items in a list so I've divided into 3 reports and served while a UNION all between them. This used 15% of the resources of the db and ran for hours and the Group dba like me to find a better way. They would prefer that I use PL/SQL.

    PL/SQL is probably going to be a slower solution, then SQL. It's almost always.

    Your best bet would be to maintain a table of nodes. You can then use a single SQL query with an IN WHERE clause as:

    WHERE node in (SELECT node FROM node_table)
    

    Or you can use a join (the method preferred honestly, gives Oracle more optimization options).

    If you don't want to maintain a table of node, you can always create a global temporary Table or the external Table that could be loaded prior to running your report.

    If you have tried these methods, and it is still too low or high intensity of resources, then we should look at the SQL and chorus only. See the PL/SQL FAQ's for more information on setting the SQL statements.

  • Update cursor problem

    Hello Experts!

    I'm trying to update one of my table after making a few changes. I don't know why I'm not able to do this simple task. I spend a lot of time but could not able to find the problem. Can anyone here to show me my mistake or correct.

    Here is my code

    -UPDATED THROUGH CURSOR
    Set serveroutput on
    declare
    cursor c_emp_sal is
    Select * from adeel_emp_007
    update of the salary;
    Start
    for r_c_emp in c_emp_sal
    loop
    Update adeel_emp_007
    Set salary = salary * 1.1;
    the location being c_emp_sal;
    end loop;
    COMMIT;
    end;


    Thanks in advance

    Why not?

    satyaki>select * from v$version;
    
    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    
    Elapsed: 00:00:01.01
    satyaki>
    satyaki>
    satyaki>select * from emp;
    
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO JOB1      DOB
    ---------- ---------- --------- ---------- --------- ---------- ---------- ---------- --------- ----
          7521 WARD       SALESMAN        7698 22-FEB-81       1650        500         30 SALESMAN
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1650       1400         30 SALESMAN
          7788 SCOTT      ANALYST         7566 19-APR-87       4356                    20 ANALYST
          7839 KING       PRESIDENT            17-NOV-81       6600                    10 PRESIDENT
          7844 TURNER     SALESMAN        7698 08-SEP-81       1980          0         30 SALESMAN
          7876 ADAMS      CLERK           7788 23-MAY-87      145.2                    20 CLERK
          7900 JAMES      CLERK           7698 03-DEC-81       1254                    30 CLERK
          7902 FORD       ANALYST         7566 03-DEC-81     4791.6                    20 ANALYST
          7934 MILLER     CLERK           7782 23-JAN-82       1716                    10 CLERK
          7566 Smith      Manager         7839 23-JAN-82       1680          0         10 Manager   23-JAN-89
          7698 Glen       Manager         7839 23-JAN-82       1680          0         10 Manager   23-JAN-89
    
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO JOB1      DOB
    ---------- ---------- --------- ---------- --------- ---------- ---------- ---------- --------- ----
             1 boock
    
    12 rows selected.
    
    Elapsed: 00:00:00.02
    satyaki>
    satyaki>
    satyaki>declare
      2     cursor c_emp_sal
      3     is
      4       select * from emp
      5       for update of sal;
      6  begin
      7   for r_c_emp in c_emp_sal
      8   loop
      9    update emp
     10    set sal = sal * 1.1
     11    where CURRENT OF c_emp_sal;
     12   end loop;
     13   COMMIT;
     14  end;
     15  /
    
    PL/SQL procedure successfully completed.
    
    Elapsed: 00:00:00.01
    satyaki>
    satyaki>select * from emp;
    
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO JOB1      DOB
    ---------- ---------- --------- ---------- --------- ---------- ---------- ---------- --------- ----
          7521 WARD       SALESMAN        7698 22-FEB-81       1815        500         30 SALESMAN
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1815       1400         30 SALESMAN
          7788 SCOTT      ANALYST         7566 19-APR-87     4791.6                    20 ANALYST
          7839 KING       PRESIDENT            17-NOV-81       7260                    10 PRESIDENT
          7844 TURNER     SALESMAN        7698 08-SEP-81       2178          0         30 SALESMAN
          7876 ADAMS      CLERK           7788 23-MAY-87     159.72                    20 CLERK
          7900 JAMES      CLERK           7698 03-DEC-81     1379.4                    30 CLERK
          7902 FORD       ANALYST         7566 03-DEC-81    5270.76                    20 ANALYST
          7934 MILLER     CLERK           7782 23-JAN-82     1887.6                    10 CLERK
          7566 Smith      Manager         7839 23-JAN-82       1848          0         10 Manager   23-JAN-89
          7698 Glen       Manager         7839 23-JAN-82       1848          0         10 Manager   23-JAN-89
    
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO JOB1      DOB
    ---------- ---------- --------- ---------- --------- ---------- ---------- ---------- --------- ----
             1 boock
    
    12 rows selected.
    
    Elapsed: 00:00:00.00
    satyaki>
    

    If it solves your problem then well want to close this thread marked it as answered.

    Kind regards.

    LOULOU.

  • Why get ORA-00942 during the validation of PL/SQL cursor

    The database is 10 gr 2.

    ST_PKG_UTILITIES contains a procedure called "p_insert_update_person_info".

    The procedure includes a cursor that selects a view 'CDS_CIS_ETHNICITY '.

    I am logged in as the owner of the schema of the package. The view lies in another schema, but I have the right to SELECT on the view.

    When I try to compile the package, I get "ORA-00942: table or view does not exist", pointing to the CDS_CIS_ETHNICITY view.

    However, if I SELECT directly from the view using a SQL window, it returns information without problem.

    Code view is a SELECT statement on a table across a db_link. However, given that I can select directly from the view, I am not clear why I would get the error because the view is selected, within PL/SQL.

    Note that the table was originally, on the same server that the schema that I am now, so no db_link was necessary. When the schema of the table has been moved to a new server, we added the db_link. However, the package was never changed, we were careful to reproduce the names of objects that are used by the package, when building the db_link.

    Ideas on this issue would be appreciated.

    Thank you
    VP

    Published by: user618800 on December 9, 2008 14:53

    Hello

    Grant privileges directly to the owner of the whole.

    Looks like the privileges that you have about this point of view have been granted to a role, and the owner of the package has this role.
    Roles do not count inside stored procedures. You must have privileges granted directly to the owner (or to the PUBLIC, which probably does not apply in this case).

  • cursor problems

    Hello

    The cursor on my MacBook Air selects texts, emails or icons out of the Blues; the cursor moves to other locations during the strike and does not allow to type a complete sentence. I disabled all the gestures the trackpad section of system preferences, I started the Mac Safeboot mode a couple of times and nothing has solved the problem. It's a MacBook Yosemite 10.10.5 2012.

    Any suggestion on how to solve this problem?

    Thank you

    There are several possible causes for the behavior. Please take each of the following steps that you have not already tried until it is resolved. Some may not apply in your case.

    1. follow the instructions provided in this support article, so this one, as appropriate. A damaged or defective power adapter could be the cause, even if it's the right kind.

    2 simultaneously press the four corners of the trackpad and release. If there is no effect, it is likely to be temporary, and in this case the device must be repaired or replaced.

    3. disconnect or turn off each Bluetooth or USB pointing device, one at a time, testing as you go. You may be able to identify one that is defective. By a pointing device "," I mean a device that moves the cursor, trackpad, mouse, trackball, or tablets. A regular keyboard isn't a pointing device. If you have a desktop without a built-in trackpad design, at least an external pointing device must be active at all times.

    4. If your model has an infrared receiver for use with an Apple Remote, turn off .

    5. This step is applicable if you are using a Mac laptop with a built-in trackpad, and you also use an external mouse or trackpad. Open the accessibility in System Preferences pane, and select mouse and Trackpad in the menu on the left. Check the box marked

    Ignore the built-in trackpad when mouse or a trackpad wireless is present

    Credit for this observation to the members of the CSA PattMK.

    6. reset the system management controller.

    7. If you use a mouse or a trackpad, Bluetooth, investigate potential interference sources, including 3 USB devices.

    8. a swollen in a laptop battery can encroach on the trackpad underneath and cause erratic behavior. If you have trouble clicking the trackpad, it is probably the reason. The battery must be replaced without delay.

    9. a faulty device or a damaged cable can cause the built-in trackpad to a MacBook to behave erratically. If you use the wired devices, disconnect them one at the time and the test.

    10. There is also a report of movement erratic cursor caused by an external display that was plugged in but not turned on.

    11. If you use transfer, disable it in the general pane of system preferences.

    12. If the mirroring of airtime to a TV is turned on, turn it off.

    13. If none of the above apply, or if you have another reason to believe that your computer is remotely controlled, pull it out of the network by turning off Wi - Fi (or your Wi - Fi access point), disconnect a Bluetooth network connection, then unplug the Ethernet cable or a USB modem, whichever is applicable. If the movement of the cursor stops at the same time, you should suspect an intrusion.

    14. an appointment of 'Genius' in an Apple store to do the machine or the tested external trackpad.

  • Libretto W100 cursor problems

    Hello

    I have a lot of problems of cursor on a new Libretto W100. Using the field courses on the display it move it in the opposite on the top of the screen. Then I go to the right below, the cursor moves in the direction towards the top left. The only way I found to stop this problem is a full reboot. And then it works OK, but when I close the lid and leave it alone for two hours, for example, come and activate the problem reappears. I especially don't even touch screens to avoid confusion between the machine. But I can reproduce it consistently.

    Very annoying. Any seen elsewhere or have a solution?

    Kind regards
    Wim.

    Hi Winm

    Since when you noticed this behavior? On the first day?

Maybe you are looking for

  • Utilities TSETUP and Other (?)

    I have a Portege 7020 portable computer, but do not have the original CD or manual (I downloaded this last). The manual mentions a TSETUP BACK. EXE utility and said that it is in the Windows directory, but as I don't have the original O.S. (Win 2000

  • ___Help send for free Windows 7 upgrade version Windows Vista Home

    I have problems to send for the free upgrade to windows 7 from vista, I bought a new compaq computer last yr. Someone gave me a free version of windows 7 to be sent to me as long as I apply before February 2010. But when I go to enter the codes that

  • How can I get rid of Babylon Search

    I downloaded div - x and since then, something called search of Babylon took over all research. I can't find it in my programs to remove it, and it still triggers a lot of problems that ad-aware pro picks up (something to do with cookies?) I tried to

  • lost my password how to disconnect in with her

    I use windows vesta and I lost my administrator password, how I live without it

  • Compaq Presario CQ56: deactivation of the system 94862628

    Hello Key problem 94862628 the error or disabled Power up password system administrator password. Can someone help me please? Thank you