Obtaining a weakly typed cursor variable's field list

In a situation where a weakly typed cursor variable is passed to a procedure, after having been previously opened, is there any way to find out what the field names or aliases are that make up the underlying cursor? Is this information available in some dynamic view?

Try:
select view_name from dba_views where view_name like '%CURSOR%';
The views you may be interested in are gv_$open_cursor and v_$open_cursor. Both have a column named SQL_TEXT that will at least give the statement the cursor is executing.
Hope this helps.

Similar Messages

  • Workaround for opening a strongly typed cursor using native dynamic SQL

    Hi All,
    In reading the PL/SQL documentation for Oracle 9i, I noted that the OPEN-FOR
    statement with a dynamic SQL string only allows the use of weakly typed cursors.
    I have verified this limitation with my own experimentation as follows:
    DECLARE
    type rec_type is record(
    str     varchar2(40),
    num     number(22)
    type cur_type is ref cursor return rec_type;
    my_cur     cur_type;
    que     varchar2(100);
    tab     varchar2(40);
    BEGIN
    tab := 'dynamic_table_name';
    que := 'select key_name, key_value from ' || tab || ' where key_name like ''01%''';
    open my_cur for que;
    loop
    if my_cur%found then
    dbms_output.put_line('source_name: ' || my_cur.str || ', page_sn: ' || my_cur.num);
    exit;
    end if;
    end loop;
    close my_cur;
    END;
    Running the above trivial example in an anonymous sql block yields the following
    errors as expected:
    ORA-06550: line 10, column 8:
    PLS-00455: cursor 'MY_CUR' cannot be used in dynamic SQL OPEN statement
    ORA-06550: line 10, column 3:
    PL/SQL: Statement ignored
    ORA-06550: line 13, column 54:
    PLS-00487: Invalid reference to variable 'MY_CUR'
    ORA-06550: line 13, column 7:
    PL/SQL: Statement ignored
    Is there a workaround to the situation? Since I do not know the table name at run
    time, I must use Native Dynamic SQL. I have a long and complex record type
    that I wish to return through JDBC using the REFCURSOR Oracle type in order to
    avoid having to register an inordinate number of OUT parameters. Moreover, I
    would like to return potentially one or more results in a ResultSet. Using the
    standard method of registering native SQL types for the IN and OUT bindings
    can only return one result. Hence the reason I would like to return a strong
    cursor type. Also, the type of query I am doing is complex, and needs to be
    executed in a PL/SQL procedure for performance reasons. Therefore simply
    executing a SELECT query dynamically built up on the the JDBC client won't
    do the trick.
    If anybody has experience with a similar problem and would like to volunteer
    information on their workaround, I would really appreciate it.
    Best Regards,
    J. Metcalf

    We can use strongly-typed REF CURSORs in DNS, but the typing derives from a table e.g.
    TYPE EmpCurTyp IS REF CURSOR RETURN emp%ROWTYPE;
    so the problem is your use of "return rec_type" bit.
    Forgive my bluntness but I think you have misunderstood strong and weak typing. You actually want to be using weakly-typed cursors. I mean this:
    Moreover, I would like to return potentially one or more results in a ResultSet. suggests that the structure of your resultset may vary, which is precisely what a weakly-typed ref cursor allows us to do. Then we can use the JDBC metadata methods to interrogate the structure of the resultset, innit.
    so try this:
    DECLARE
    type cur_type is ref cursor;
    my_cur cur_type;
    que varchar2(100);
    tab varchar2(40);
    BEGIN
    tab := 'dynamic_table_name';
    que := 'select key_name, key_value from ' || tab || ' where key_name like ''01%''';
    open my_cur for que;
    loop
    if my_cur%found then
    dbms_output.put_line('source_name: ' || my_cur.str || ', page_sn: ' || my_cur.num);
    exit;
    end if;
    end loop;
    close my_cur;
    END;
    ras malai, APC
    Cheers, APC

  • How to inspect a cursor variable in a debug session?

    In a function inside the body of a package I do...
    Example:
    V_SITUACIONESACTYHIST C_SITUACIONESACTYHIST%ROWTYPE;
    BEGIN
    FOR v_SituacionesACTyHIST IN c_SituacionesACTyHIST( p_id_DECE400, p_idpers )
    LOOP
    IF ( V_SITUACIONESACTYHIST.ESTADO_SITUACION = 'S' ) THEN
    v_hay_regs_hist:=1;
    END IF;
    END LOOP;
    where the cursor variable c_SituacionesACTyHIST is declared in the specifications package (Is this the problem, because is a global declaration?).
    When debugging I cannot inspect the value of V_SITUACIONESACTYHIST.ESTADO_SITUACION or whatever cursor variable field; I always obtain "NULL" as value...
    Why?
    How can I see the value of that variables?
    I have the same problem in v2.1 and 1.5.5 version of sqldeveloper.
    Thanks.
    Edited by: pacoKAS on 11-feb-2010 0:14
    Edited by: pacoKAS on 11-feb-2010 0:17
    Edited by: pacoKAS on 11-feb-2010 0:17
    Edited by: pacoKAS on 11-feb-2010 0:19
    Edited by: pacoKAS on 11-feb-2010 0:21
    Edited by: pacoKAS on 11-feb-2010 0:22
    Edited by: pacoKAS on 11-feb-2010 0:22

    I'm proposing that you don't have a variable named the same as your cursor variable.
    CREATE OR REPLACE
    PROCEDURE P1
    AS
      CURSOR test_cur
      IS
        SELECT owner, table_name FROM all_tables WHERE ROWNUM <= 10;
      --  x test_cur%rowtype;  /* This variable is not needed. */
    BEGIN
      FOR x IN test_cur  /* If you don't have another variable named x somewhere, you can see values for x */
      LOOP
        dbms_output.put_line(x.owner || '.' || x.table_name);
      END LOOP;
    END P1;from your example...
    V_SITUACIONESACTYHIST C_SITUACIONESACTYHIST%ROWTYPE;
    BEGIN
    FOR v_SituacionesACTyHIST IN c_SituacionesACTyHIST( p_id_DECE400, p_idpers )
    LOOP
    IF ( V_SITUACIONESACTYHIST.ESTADO_SITUACION = 'S' ) THEN
    v_hay_regs_hist:=1;
    END IF;
    END LOOP;You're declaring your variable twice:
    (1) V_SITUACIONESACTYHIST C_SITUACIONESACTYHIST%ROWTYPE;
    (2) FOR v_SituacionesACTyHIST IN c_SituacionesACTyHIST
    When you're debugging, it's looking at the first version...which is null because you haven't assigned anything to it. When you use a Cursor For-Loop like that, it implicitly declares the variable for you. You don't have to do it in your DECLARE section.
    Edited by: DylanB123 on Feb 16, 2010 1:04 PM

  • WEAK REF CURSOR type

    This is the first time I have a need at work to use a REF CURSOR type of the weak variety. After reading documentation
    in SF's 'bible' Oracle PL/SQL Programming, I did everything right. Here's the code snippet:
    -- TYPES
    TYPE content_ID_curtype IS
    REF CURSOR;
    -- VARIABLES
    c_SEARCH_STRING CONSTANT VARCHAR2(12) := 'v_content_id';
    content_ID_cur content_ID_curtype;
    v_content_ID am_content_content.content_ID%TYPE;
    BEGIN
    cache_sql_rec.sql_stmt := REPLACE(cache_sql_rec.sql_stmt, c_SEARCH_STRING, template_name_rec.content_ID);
    OPEN content_ID_cur FOR cache_sql_rec.sql_stmt;
    LOOP
    FETCH content_ID_cur
    INTO v_content_ID;
    EXIT WHEN content_ID_cur%NOTFOUND;
    END LOOP;
    CLOSE content_ID_cur;
    END;
    Now the error I get is.... ORA-00911: invalid character When I used DBMS_OUTPUT to see the actual value of
    "cache_sql_rec.sql_stmt", the SQL query looks fine. Even when I hardcoded the sql statement after the FOR keyword, it
    worked fine. It's only when I use a variable to hold the whole SQL statement does it fail. Here's one value for the
    variable cache_sql_rec.sql_stmt:
    SELECT b.content_id
    FROM am_content_mofcollection a,
    am_content_collection b
    WHERE a.content_id = 149090
    AND a.collection_id = b.collection_id;
    Basically I replace the string with an actual content_ID. Now content_ID is of type NUMBER(12) as is the variable
    v_content_ID declared so that I FETCH INTO that variable, but the problem is, is that the exception gets raised during
    the OPEN...cursor...FOR....sql_statement command.
    Any thoughts on this bug?
    Thanks,
    Gio
    Giovanni Jaramillo
    Senior Software Engineer
    Oracle Database Group
    Amplified Holdings, Inc.
    5750 Wilshire Blvd., Ste 501
    Los Angeles, CA 90036-3638
    (323)-556-8792
    [email protected] http://www.amplified.com

    Yes it turns out that the data had a semicolon at the end since it's being inserted by someone else. I know when executing DDL or DML statements via NDS you omit the semicolon. But didn't know it applied to REF CURSORS.
    Also I added a colon to the variable that I was REPLACING since it can act as a bind variable.
    Thanks Andrew.
    Gio
    null

  • Describe weak ref cursor

    I want to implement a stored procedure which takes a
    weak ref cursor as one of its IN parameters. In the body
    of the SP I want to analyze the "structure" of the weak
    ref cursor: column names and types.
    Any hints how to do this in PL/SQL?? Of course, in C via OCI
    describing a (weak) ref cursor at run-time is no problem at
    all.
    Tobias.

    it is not possible to fetch into some variable, which doesn't match the structure of the cursor variable.....
    There is one way.....you can discard the first n records while assigning the query to cursor variable....
    Frame ur query that ur going to assocaite to the cursor in the following way....
    select * from (select rownum a, test.* from test) where a > N
    where 'N' is the no of records that u don't want to be in the cursor.....
    if u have doubt in this approach get back to me...

  • Weak REF CURSOR: discarding records?

    Hi,
    I'd like to discard the first N records from a weak REF CURSOR without having to specify the structure of the cursor. Is this possible?
    For example:
    LOOP
    FETCH results INTO garbagecan
    EXIT WHEN results%NOTFOUND;
    END LOOP;
    It seems that FETCH statement requires INTO to be specified with the correct structure.
    -Jerome
    null

    it is not possible to fetch into some variable, which doesn't match the structure of the cursor variable.....
    There is one way.....you can discard the first n records while assigning the query to cursor variable....
    Frame ur query that ur going to assocaite to the cursor in the following way....
    select * from (select rownum a, test.* from test) where a > N
    where 'N' is the no of records that u don't want to be in the cursor.....
    if u have doubt in this approach get back to me...

  • Cursor Variable in Nested Block

    Dear all,
    I have a package that has procedures that open cursor variables and print the queries of sample schema HR. There's one procedure that opens the cursor with an input integer to choose which query that wants to be fetched. The other prints the query by fetching the cursor in a nested block with exceptions. The following package runs as intended, it prints all the three options without any problems:
    CREATE OR REPLACE PACKAGE admin_data AS
    TYPE gencurtyp IS REF CURSOR;
    PROCEDURE open_cv (generic_cv IN OUT gencurtyp, choice INT);
    procedure print_cv (generic_cv gencurtyp);
    END admin_data;
    CREATE OR REPLACE PACKAGE BODY admin_data AS
    PROCEDURE open_cv (generic_cv IN OUT gencurtyp, choice INT) IS
    BEGIN
    IF choice = 1 THEN
    OPEN generic_cv FOR SELECT * FROM jobs where job_id='ST_MAN';
    ELSIF choice = 2 THEN
    OPEN generic_cv FOR SELECT * FROM departments where department_id=270;
    ELSIF choice = 3 THEN
    OPEN generic_cv FOR SELECT * FROM employees where employee_id=206;
    END IF;
    END;
    procedure print_cv (generic_cv gencurtyp)is
    employees_rec employees%rowtype;
    departments_rec departments%rowtype;
    jobs_rec jobs%rowtype;
    begin
    fetch generic_cv into jobs_rec;
    dbms_output.put_line(jobs_rec.job_title);
    exception
    when ROWTYPE_MISMATCH then
      begin
      fetch generic_cv into departments_rec;
      dbms_output.put_line(departments_rec.department_name);
      exception
      when ROWTYPE_MISMATCH then
        dbms_output.put_line('row mismatch');
        fetch generic_cv into employees_rec;
        dbms_output.put_line(employees_rec.first_name);
      when OTHERS then
        dbms_output.put_line('others');
        fetch generic_cv into employees_rec;
        dbms_output.put_line(employees_rec.first_name);
      end;
    end print_cv;
    END admin_data;
    declare
    some_cur admin_data.gencurtyp;
    begin
    admin_data.open_cv(some_cur,1);
    admin_data.print_cv(some_cur);
    admin_data.open_cv(some_cur,2);
    admin_data.print_cv(some_cur);
    admin_data.open_cv(some_cur,3);
    admin_data.print_cv(some_cur);
    admin_data.open_cv(some_cur,3);
    admin_data.print_cv(some_cur);
    admin_data.open_cv(some_cur,1);
    admin_data.print_cv(some_cur);
    admin_data.open_cv(some_cur,2);
    admin_data.print_cv(some_cur);
    end;
    17  /
    Stock Manager
    Payroll
    row mismatch
    William
    row mismatch
    William
    Stock Manager
    Payroll
    PL/SQL procedure successfully completed.The innermost block executes 'rowtype mismatch' exception block, which fetches
    SELECT * FROM employees where employee_id=206 query.
    This time, I switch the query fetch so that
    SELECT * FROM employees where employee_id=206query is in the outermost block and
    SELECT * FROM jobs where job_id='ST_MAN' is in the innermost block. The package body looks like this:
    CREATE OR REPLACE PACKAGE BODY admin_data AS
    PROCEDURE open_cv (generic_cv IN OUT gencurtyp, choice INT) IS
    BEGIN
    IF choice = 1 THEN
    OPEN generic_cv FOR SELECT * FROM jobs where job_id='ST_MAN';
    ELSIF choice = 2 THEN
    OPEN generic_cv FOR SELECT * FROM departments where department_id=270;
    ELSIF choice = 3 THEN
    OPEN generic_cv FOR SELECT * FROM employees where employee_id=206;
    END IF;
    END;
    procedure print_cv (generic_cv gencurtyp)is
    employees_rec employees%rowtype;
    departments_rec departments%rowtype;
    jobs_rec jobs%rowtype;
    begin
    fetch generic_cv into employees_rec;
    dbms_output.put_line(employees_rec.first_name);
    exception
    when ROWTYPE_MISMATCH then
      begin
      fetch generic_cv into departments_rec;
      dbms_output.put_line(departments_rec.department_name);
      exception
      when ROWTYPE_MISMATCH then
        dbms_output.put_line('row mismatch');
        fetch generic_cv into jobs_rec;
        dbms_output.put_line(jobs_rec.job_title);
      when OTHERS then
        dbms_output.put_line('others');
        fetch generic_cv into jobs_rec;
        dbms_output.put_line(jobs_rec.job_title);
      end;
    end print_cv;
    END admin_data;
    then I run the same anonymous block, I get:declare
    some_cur admin_data.gencurtyp;
    begin
    admin_data.open_cv(some_cur,1);
    admin_data.print_cv(some_cur);
    admin_data.open_cv(some_cur,2);
    admin_data.print_cv(some_cur);
    admin_data.open_cv(some_cur,3);
    admin_data.print_cv(some_cur);
    admin_data.open_cv(some_cur,3);
    admin_data.print_cv(some_cur);
    admin_data.open_cv(some_cur,1);
    admin_data.print_cv(some_cur);
    admin_data.open_cv(some_cur,2);
    admin_data.print_cv(some_cur);
    end;
    17 /
    others
    Payroll
    William
    William
    others
    Payroll
    PL/SQL procedure successfully completed.
    The strangest thing is the innermost block execute OTHERS exception block instead of ROWTYPE MISMATCH and the the record doesn't fetch anything. What happen? How come the result is different when I only switch the query?
    Best regards,
    Val

    Hi Sy,
    thanks for the reply, yes I agree that the code is cumbersome, I'm studying to prepare OCP PL/SQL certification, so I'm playing around with cursor variable in order to grasp the whole concept. I'm observing the behaviour of weak cursor variable when getting passed into a function and fetched couple of times and exploring exception propagation in the same time. This why the code looks not relevant in the real world.
    Anyway, I just curious how it behaves like that. Here's my instance info:
    SQL> select * from v$version
      2  ;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE     11.2.0.1.0     Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production

  • Typing freezes when typing in a text field

    When typing in a text field (commenting on a blog for example) the typing freezes if i try to backspace or move to cursor to add/correct something. How can I fix this? This happens  in Safari, but when I tried Chrome I had the same problem!

    Sorry just saw you were running iOS 6.
    To quit all apps in iOS 6, Double tap the Home button, hold an app icon until it wiggles then tap the for each app that is open. then try the reset.
    If that does not help you may want to try restoring.
    Be sure toi backup first.
    If restoring from a backup does not solve the problem then restore as a new device.
    iOS: Back up and restore your iOS device

  • Bank statement: problem to load variable length field

    we have many bank accounts with different banks, and we would like to use the bank reconciliation module to do bank reconciliation.
    we have problem in load the MT940 bank statement. All these banks are providing so called standard SWIFT940 format, which not able to give fixed length field.
    we have problem on line 61 which have a lot of variable length fields.
    line 61 comprise of 7 fields, which are:
    A) Value date - fixed 6 chars.
    B) Entry date - fixed 4 chars.
    C) Credit/debit - variable 1-2 chars.
    D) Fund Code - fixed 1 char
    E) Transaction amount - variable 15 chars
    F) Transaction code/type - fixed 4 chars
    G) MID, cheque#, BIS - variable 16 chars
    How can we write the SQL Loader script if there is no delimiter, and the start position of the fields are not fixed?
    we can load A and B easily, but C onwards we will have problems.
    please help.
    INTO TABLE ce_stmt_int_tmp
    WHEN rec_id_no = '61'
    TRAILING NULLCOLS
    (rec_no RECNUM,
    rec_id_no POSITION(1:2) CHAR,
    column1 POSITION(4:9) CHAR,
    column2 POSITION(10:13) CHAR,
    column3 ??
    column4 ??
    column5 ??
    column6 ??
    column7 ??
    ------

    Hi Linda,
    As said by gupta, please check, whether the bank statement has the statement 62F:
    If not, please get the statement again from bank and ensure that the end statement 62F exists in the statement..
    This will help you to overcome your problem..
    Regards,
    Praisty

  • Accessing the variable in field symbol of nested internal table

    Hi,
    I am unable to access the variable in field symbol.
    The data in field symbol has nested structure. We need to access a variable in nested structure.
    Please find the code below:
          LOOP AT <i_fincorp> into <fs_fincorp>.
            l_madefor = <FS_FINCORP>-data_UI-ZZ0010.
          ENDLOOP.
    datatype of <i_fincorp> is type any table and <fs_fincorp> is type any.
    there is a structure 'data_ui' in <i_fincorp> and we need value of field 'ZZ0010' in data_ui structure.
    But, we are getting syntax error for statement in loop stating "There is no component like 'data_ui' in <fs_fincorp>".
    Can anyone please help me solving this issue.
    Regards,
    Santosh

    So simply access it dynamically
    data: nested_field type c length 50.
    field-symbols <nested_field> type any.
    "build the nested field name dynamically
    concatenate
           'DATA_UI'    "first give structure name
           'ZZ0010'  "then give field name (all in uppercase!)
    into nested_field
    separated by '-'.  "now you have DATA_UI-ZZ0010
    "so assing this nested field
    LOOP AT <i_fincorp> into <fs_fincorp>.
       assign component (nested_field) of structure <fs_fincorp> into <nested_field>. 
    ENDLOOP.
    Regards
    Marcin

  • How to set cursor in perticular field Table Maintence generator?

    Hi
    All
    I have created a table with 2 fields  Start_date and End_date. Now my requirement is i have to validate the both date field as Start_Date must be LESS than or EQUAL to End_Date. In table maintenance maintenance generator i have created a event VALIDATE_DATE in event 21. Its validating perfectly. The issue is after the ERROR message the Cursor is going to the key field. I want to set the cursor at End_Date field.
    I used
    data:ly_pos type i.
    IF NOT start_date LE end_date.
        SET CURSOR FIELD 'TABLE_NAME-END_DATE' LINE sy-linno OFFSET lv_pos.
        MESSAGE exxx(MsgClass).
    ENDIF.
    Its working for the FIRST time i am entering the new data. Next time the cursor going to the KEY field.  I have been asked not to write code in SE80. Anyhow i have to set the cursor in table maintenance maintenance generator event.
    Can anybody help?

    Hi Sourav,
    Please follow the below method:
    Go to Maintainance Screen (where you want the cursor setting). Goto Status - > Remember the screen name -> Double click on Program name.. Open Object list and expant Screen Tree -> double click on the same screen Number -> Go to its first tab attributs -> Change Mode -> Do F4 on Cursor Position field -> Choose the field where you want the cursor.
    But this way will always set the cursor at the HardCoded Field Name.
    Thanks,
    Preyansh

  • SQL*Loader and "Variable length field was truncated"

    Hi,
    I'm experiencing this problem using SQL*Loader: Release 8.1.7.0.0
    Here is my control file (it's actually split into separate control and data files, but the result is the same)
    LOAD DATA
    INFILE *
    APPEND INTO TABLE test
    FIELDS TERMINATED BY ','
    OPTIONALLY ENCLOSED BY '"'
    first_id,
    second_id,
    third_id,
    language_code,
    display_text VARCHAR(2000)
    begindata
    2,1,1,"eng","Type of Investment Account"
    The TEST table is defined as:
    Name Null? Type
    FIRST_ID NOT NULL NUMBER(4)
    SECOND_ID NOT NULL NUMBER(4)
    THIRD_ID NOT NULL NUMBER(4)
    LANGUAGE_CODE NOT NULL CHAR(3)
    DISPLAY_TEXT VARCHAR2(2000)
    QUESTION_BLOB BLOB
    The log file displays:
    Record 1: Warning on table "USER"."TEST", column DISPLAY_TEXT
    Variable length field was truncated.
    And the results of the insert are:
    FIRST_ID SECOND_ID THIRD_ID LANGUAGE_CODE DISPLAY_TEXT
    2 1 1 eng ype of Investment Account"
    The language_code field is imported correctly, but display_text keeps the closing delimiter, and loses the first character of the string. In other words, it is interpreting the enclosing double quote and/or the delimiter, and truncating the first two characters.
    I've also tried the following:
    LOAD DATA
    INFILE *
    APPEND INTO TABLE test
    FIELDS TERMINATED BY '|'
    first_id,
    second_id,
    third_id,
    language_code,
    display_text VARCHAR(2000)
    begindata
    2|1|1|eng|Type of Investment Account
    In this case, display_text is imported as:
    pe of Investment Account
    In the log file, I get this table which seems odd as well - why is the display_text column shown as having length 2002 when I explicitly set it to 2000?
    Column Name Position Len Term Encl Datatype
    FIRST_ID FIRST * | O(") CHARACTER
    SECOND_ID NEXT * | O(") CHARACTER
    THIRD_ID NEXT * | O(") CHARACTER
    LANGUAGE_CODE NEXT 3 | O(") CHARACTER
    DISPLAY_TEXT NEXT 2002 VARCHAR
    Am I missing something totally obvious in my control and data files? I've played with various combinations of delimiters (commas vs '|'), trailing nullcols, optional enclosed etc.
    Any help would be greatly appreciated!

    Use CHAR instead aof VARCHAR
    LOAD DATA
    INFILE *
    APPEND INTO TABLE test
    FIELDS TERMINATED BY ','
    OPTIONALLY ENCLOSED BY '"'
      first_id,
      second_id,
      third_id,
      language_code,
      display_text    CHAR(2000)
    )From the docu:
    A VARCHAR field is a length-value datatype.
    It consists of a binary length subfield followed by a character string of the specified length.
    http://download-west.oracle.com/docs/cd/A87860_01/doc/server.817/a76955/ch05.htm#20324

  • How can I get firefox to stop moving the typing cursor to my homepages' search engine automatically?

    What usually happens is when I open firefox I'll usually start typing in the url bar or in the browser search engine to the right of url bar. The problem is that while I'm in the middle of typing, firefox will move my cursor to the homepage's search engine. This gets annoying after awhile because I'll have to stop and reclick where I was typing at (sometimes it'll even move it back!). Is there a way to disable this so that firefox won't try to relocate my typing cursor every time a new page loads?

    You can set to open a blank page on opening Firefox and click the Home button if you want to see the Home page. You can also click ESC to stop loading the page before typing in the location bar.
    Tools > Options > General > Startup: "When Firefox Starts": "Show a blank page"

  • How to pass a litral string into cursor variable?

    Hi All
    I have a code like below:
    I need to select the following table,column with the criteria as such but it looks like the literal string does not work for cursor variable.
    I can run the SQL in sqlplus but how I can embed that in PL/SQL code??
    -Thanks so much for the help
    cursor ccol2(Y1 varchar2) is select table_name,column_name from user_tab_columns
    where table_name like 'HPP2TT%' and table_name like '%Y1'
    and column_name not in ('MEMBERID');

    Literal strings are fine in a cursor, however, your logic is likely wrong, and you are not using the Y1 parameter to the cursor correctly. If you are looking for tables that either start with HPP2TT or end with Y1 (whatever you pass as Y1), then you need something more like:
    cursor ccol2(Y1 varchar2) is
    select table_name, column_name
    from user_tab_columns
    where (table_name like 'HPP2TT%' or
           table_name like '%'||Y1) and
          column_name not in ('MEMBERID');In the unlikely event that you are lookig for table that actually do start with HPP2TT and end in whatever is passed in Y1 then your query could be simplified to:
    cursor ccol2(Y1 varchar2) is
    select table_name, column_name
    from user_tab_columns
    where table_name like 'HPP2TT%'||Y1 and
          column_name not in ('MEMBERID');Note in both cases, a single member in-list is bad practice, although Oracle will transform it to an equality predicate instead.
    John

  • Cursor variable in a Java program

    Hi all,
    I would like to know is how to explicitly pass a cursor variable to a stored procedure after defining it in the java source and to get the result back to the same variable.
    An example would be appreciated.
    Thanks in advance
    Giridhar

    I think java profiler can do the job. There are sharewares i know of like JSprint and JProfiler.

Maybe you are looking for

  • Create table where table name is a variable

    I need to be able to create tables where the table name is a variable . Using PL/SQL in Oracle 9. Also need to insert and query the table. THANK YOU

  • How do I modify the default alarm?

    I hate it that the default alarm is set to sound an alert. I work in music production and I dread the next hoot. How do I set the default alarm to silent? pete

  • Adobe Reader Version 11.0.11 Won't allow me to save pfd after amendments

    We are currently using Adobe Reader Version 11.0.10. When we open and existing pdf file then make any changes (using the Fill & Sign Tab at the top right hand side) then click Save it won't save the file.  We have to re-name the file in order to save

  • Preferences Errors

    I have the download version of Photoshop CS5 Extended. It is installed, activated, and works great. Problem:  When I go into the prefences panel, I get an error when I attempt the access the File Handling or Performance panels. Error:     "An integer

  • Equium A300D laptop completly shutsdown at random times

    Equium A300D laptop completly shutsdown at random times It could be overheating. It really cant cope when trying to restore i-phone - i have been unable to do this as the laptop doesn't stay on long enough Playing and / or burning various media is al