BULK COLLECT using Dynamic PL/SQL???..pls help!!!

Hi All,
Here is PL/SQL block i tried ...unfortunetly failed to execute.
Can anyone put some light on how this can be achieved....no matter even if its a work around job!!
Thanx in advance,
Anita
DECLARE
RCODE VARCHAR2(30):='TBS1B';
RLCODE VARCHAR2(10):='1U6';
RLSQL     CLOB;
VSQL CLOB;
TYPE TTABLE IS TABLE OF VARCHAR2(20) INDEX BY BINARY_INTEGER;
TRCODE TTABLE;
BEGIN
SELECT RL_SQL INTO RLSQL FROM COGNOS_RL WHERE RL_CODE=RLCODE;
VSQL:='SELECT DISTINCT '||RCODE||' BULK COLLECT INTO TRCODE FROM CBTABLE WHERE '||RLSQL;
DBMS_OUTPUT.PUT_LINE(TO_CHAR(VSQL));
EXECUTE IMMEDIATE TO_CHAR(VSQL);
END;
ERROR::
03001. 00000 - "unimplemented feature"
*Cause:    This feature is not implemented.
*Action:   None.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Hi,
Try with the following code....
DECLARE
RCODE VARCHAR2(30):='TBS1B';
RLCODE VARCHAR2(10):='1U6';
RLSQL CLOB;
VSQL CLOB;
TYPE TTABLE IS TABLE OF VARCHAR2(20) INDEX BY BINARY_INTEGER;
TRCODE TTABLE;
BEGIN
SELECT RL_SQL INTO RLSQL FROM COGNOS_RL WHERE RL_CODE=RLCODE;
VSQL:='SELECT DISTINCT '||RCODE||' FROM CBTABLE WHERE '||RLSQL;
DBMS_OUTPUT.PUT_LINE(TO_CHAR(VSQL));
EXECUTE IMMEDIATE TO_CHAR(VSQL) BULK COLLECT INTO TRCODE;
END;
Regards,
Sailaja

Similar Messages

  • I have brought ipad 2 from USA to INDIA(32 GB WIFI). I am unable to register with app store using my credit card using india details. Pls help.

    I have brought ipad 2 from USA to INDIA(32 GB WIFI). I am unable to register with app store using my credit card using india details. Pls help.

    You cannot. To open an account on a different iTunes country you must have a valid credit card issued from a bank in that country. You must have a billing address in that country, as well.
    There are reasons why some apps are not available in all iTunes stores.

  • HT204266 Hi pls support me how to switch my store to Saudi Arabian store? By mistake my store is switched to USA store so now I'm unable use my apple id, pls help me

    Hi pls support me how to switch one store to another store? Because my store is Saudi Arabian store but mistakenly now it is switched to USA store
    So now I'm unable to use my apple id, pls help me

    Settings / iTunes & App Stores, tap on your AppleID, then Account / Country-Region.

  • Needed help in bulk collect using collections

    Hi,
    I have created a schema level collection like "CREATE OR REPLACE TYPE T_EMP_NO IS TABLE OF NUMBER ;
    will i able to use this in a where clause which involves bulk collect?
    Please share ur thoughts.
    My oracle version is 10g

    user13710379 wrote:
    Will i be able to do a bulk collect into a table using this collection of my sql type?Bulk fetches collects into an array like structure - not into a SQL table like structure. So calling a collection variable in PL/SQL a "+PL/SQL table+" does not make much sense as this array structure is nothing like a table. For the same reason, one needs to question running SQL select statements against PL/SQL arrays.
    As for your SQL type defined - it is a collection (array) of numbers. Thus it can be used to bulk fetch a numeric column.

  • Error while using Javamail...pls help me...

    when i am using javamail for sending mail , i am getting error like,
    C:\jdk1.3\bin\mail>java MailSend
    [email protected] [email protected]
    javax.mail.SendFailedException: Sending failed;
    nested exception is:
    javax.mail.MessagingException:
    at javax.mail.Transport.send0(Transport.java:218)
    at javax.mail.Transport.send(Transport.java:80)
    at MailSend.Send(MailSend.java:56)
    at MailSend.main(MailSend.java:73)
    and i define properties like,
    mailProp.put("java", "java");
    where , "java" is my system name, and there is also mail server on my system. and my system is connected with proxy server..
    when i am trying
    mailProp.put("mail.smtp.host", "java");
    then i am getting same type of error...
    so, what is that ? pls help me to solve my error...

    Surely there's more information associated with that MessaginException than
    you've included here.
    Turn on session debugging and run your program again.
    http://java.sun.com/products/javamail/FAQ.html#debug

  • Dynamic Prepared statement--pls help

    I need to create a prepared statement where i do not know how many parameters( or arguments i.e " ? ") will be passed. The arguments are decided dynamically while runtime...as in i may pass only a single argument or many.
    example:
    select * from employee_table where employee_id in (?,?....)
    in the above query i may only one employee_id or may be more than one.This is decided during run time.I do not want to run a for loop for the number of employee is as this will cause performance issue. can anybody please tell me how these arguments can be generated dynamically
    thanks 4 ur help in advance

    When will you know the emp.Id ?
    Reason is Once you get the emp.Id at runtime means you can assign this id to string variable using the comma separator and assigned this string to the query.
    Example
    String listOfEmpId = "e11,ee23,e55..."; and then use this variable in the query.

  • How to call BULK COLLECT using JDBC in JSP?

    Hi
    I am using BULK COLLECT instead of CURSOR in my Stored Procedure.
    How to use these stuff in JDBC.
    If i am using CURSOR means
    cs.registerOutParameter(1,oracle.jdbc.driver.OracleTypes.CURSOR);
    is used.
    Which types i have to use?
    I am retriving morethan one record using FOR. LOOP in SP and before that
    BULK COLLECT is used in SELECT query..
    Can you give jsp code for this?
    Thanks

    you may find related sample jdbc code on otn - http://www.oracle.com/technology/sample_code/tech/java/sqlj_jdbc/index.html
    Best regards.

  • Apple id lost. Cannot get access to it. Started with a mail from apple id saying that apple id and password were changed. Did not sent such a request. Cannot get a new apple id as the mail adress already has been used one time. Pls help

    Apple id lost. Cannot get Access to it. Started with a mail from apple id saying that apple id and password were changed. Did not sent such a request myself. Since then no acces to apple id, not even via forgot my id site. It says that my apple id and birth date details do not match. Something is obviosly totally wrong. Got a visa card recently, is that the reason? Cannot get a new apple id with my real address as the systems says its already used. Pls help, I am vey frustated that this can happen.
    Best regards
    Laus Lausen

    Call Apple account security via the telephone for your country
    http://support.apple.com/kb/HE57

  • How to install sccm client on bulk collections using push installation

    Unfortunately I did something and received the following description:-
    How to know/reproduce the following scenario by installing sccm client on bulk collections in SCCM 2012R2? 
    "User ***** requested that the CCRs will be generated for collection “All Windows Client Systems (P0100015), The SMS Provider did not generate CCRs for all the system resources in this collection.
    Possible cause: some system resources are not assigned to the current site, and you chose to insta
    Il clients only on system resources that are
    assigned to current site. 
    Another possible cause: Some system resources do not have Microsoft Windows NT operating system
    or above installed.
    Message ID: 30110"

    Ok. Some of your clients are not covered under any site assignment boundary, hence you are getting that error. Would recommend you to select "Install the client from a specified site" and select the Primary site. If your boundary groups for content
    are configured fine then the client will be installed from the appropriate site for each machine you are pushing the client to.
    -RG

  • Dynamic PL/SQL - Urgent help required

    Hi there
    I am trying to write a packaged function which takes the table name and column name as arguments and build a pl/sql table which the function returns.
    Please do find the code below:
    Create or Replace Package Pk_valid_values
    is
    TYPE list_rec is record ( lc_list_desc varchar2(50));
    TYPE list_tab is TABLE of list_rec
    index by binary_integer;
    FUNCTION Fn_fetch_values
    ( p_table_name varchar2,
    p_column_name varchar2 )
    return list_tab;
    End Pk_valid_values;
    Create or Replace Package Body Pk_valid_values
    as
    FUNCTION Fn_fetch_values
    ( p_table_name varchar2,
    p_column_name varchar2 )
    return list_tab
    is
    l_values Pk_valid_values.list_tab;
    i binary_integer := 0;
    lc_element varchar2(50);
    ln_dummy number;
    v_cursor integer;
    lc_string varchar2(2000);
    ln_count number;
    BEGIN
    ln_count := Pk_count_record.Count_record(p_table_name);
    v_cursor := dbms_sql.open_cursor;
    lc_string := 'begin select p_column_name into :felement from '||
    p_table_name||' ; end;';
    dbms_sql.parse( v_cursor,
    lc_string,
    dbms_sql.native );
    dbms_sql.bind_variable( v_cursor,
    ':felement',
    lc_element );
    ln_dummy := dbms_sql.execute( v_cursor );
    for i in 1..ln_count loop
    dbms_sql.variable_value( v_cursor,
    ':felement',
    lc_element );
    l_values(i) := lc_element;
    end loop;
    dbms_sql.close_cursor( v_cursor );
    return( l_values );
    END Fn_fetch_values;
    End Pk_valid_values;
    I get an error "PLS-00382: expression is of wrong type" when I try to create this package.
    Could anyone please let me know where I have gone wrong?
    I have really burst my heads against this.
    Thanks in advance
    Rajeev

    Hi,
    I think it is that you declare a PL/SQL block, not a cursor.
    Try to replace :
    lc_string := 'begin select p_column_name into :felement from '||
    p_table_name||' ; end;';
    with :
    lc_string := 'select ' || p_column_name || ' from ' || p_table_name;
    Or an easier way :
    declare
    TYPE RefCurTyp IS REF CURSOR;
    cr RefCurTyp;
    lc_element varchar2(50);
    begin
    OPEN cr FOR 'select ' || p_column_name || ' from ' || p_table_name;
    LOOP
    FETCH cr INTO lc_element;
    EXIT WHEN cr%NOTFOUND;
    END LOOP;
    CLOSE cr;
    end;
    /Uffe

  • How to use the User Dictionary---Pls help me......

    User dictionary how to use?
    1. I have typed all the words in the Oxford hyphenation dictionary and saved text file.
    2. I have created new dictionary in the preference file.
    3. i have imported all the typed words in the created dictionary file.
    4. I have faced the problem. User dictionary is not supporting properly. Can i disable the System dictionary.
    5. Most of the words are hyphenating by system dictionary only
    Can any one help me out. how to handle this.

    One thread is sufficient, please. If noone responds it means they don't have an answer for you.
    If you can help the OP, please see his original post at http://forums.adobe.com/message/2169036#2169036
    I am locking this thread.

  • Need to retrieve all the node values of xml using DOM parser..pls help

    I want to fetch each node value in this xml file:
    <?xml version="1.0" encoding="UTF-8"?>
    <Main>
    <AAAAA>
    <ES>ESValue</ES>
    <EI>EIValue</EI>
    </AAAAA>
    <BBBBB>
    <SIP>
    <ST>STValue</ST>
    <TB>TBValue</TB>
    <PM>PMValue</PM>
    <VIP>
    <CARP>
    <AN1>AN1Value</AN1>
    <BN>BNValue</BN>
    </CARP>
    <DARP>
    <SA>
    <AN2>AN2Value</AN2>
    <CN>CNValue</CN>
    </SA>
    </DARP>
    </VIP>
    </SIP>
    </BBBBB>
    </Main>
    output should be the inner text values of diffrent nodes that contain some values..
    i.e
    output:
    ESValue
    EIValue
    STValue
    TBValue
    PMValue
    AN1Value
    BNValue
    AN2Value
    CNValue
    so that i can use thses node values and put it them in database...

    pls check the above xml file in proper redable order...I need to parse using DOM and fetch node values that are present...
    <?xml version="1.0" encoding="UTF-8"?>
    <Main>
        <AAAAA>
            <ES>ESValue</ES>
            <EI>EIValue</EI>
        </AAAAA>
        <BBBBB>
            <SIP>
                <ST>STValue</ST>
                <TB>TBValue</TB>
                <PM>PMValue</PM>
                <VIP>
                    <CARP>
                        <AN1>AN1Value</AN1>
                        <BN>BNValue</BN>
                    </CARP>
                    <DARP>
                        <SA>
                            <AN2>AN2Value</AN2>
                            <CN>CNValue</CN>
                        </SA>
                    </DARP>
                </VIP>
            </SIP>
        </BBBBB>
    </Main>

  • Unable to size a pop-window that redirects to a regular url using dynamic PL/SQL

    Hello,
    I have an instruction like this in a pluggin:
    begin
        htp.p('<font size="3" color="FireBrick">Cannot find? Search on </font>' || '<a href="http://www.google.com" target="_blank"><font size="4" color="FireBrick"><b>Google</b></a>');
    end;
    It displys the Google page in another window.
    How can size the wiindow? For example adding width=200, height=100 to the href tag doesn't  help....
    Do I need to use JavaSvript?
    If yes, can someone provide me with an example?
    Thanks by advance for any tip.
    Kind Regards.

    use this
    begin
        htp.p('<font size="3" color="FireBrick">Cannot find? Search on </font>' || '<a href="http://www.google.com" onclick="window.open(this.href, ''new_win'',
    ''width=400,height=500''); return false;"><font size="4" color="FireBrick"><b>Google</b></a>');
    end;
    let me know if this answers your query in the current thread

  • Function moduke use in bdc BAPI_MATPHYSINV_POSTDIFF(pLS HELP)

    Hi,
    How to use thsi function module ..
    i need to transfer data in Tcode MEI08,
    I need to develop a progarm to transfer data from text file to sap system
    Is it possible to use this.
    Kindly Help me
    Sincerely
    Jayalakshmy

    Hi Jaya,
    This FM is used to post differences for physical inventory documents that have been counted. Please check the FM documentation for more details.
    If u r still not clear then open this FM in SE37 and press where used list button. If some one has already used this FM then it will list all those objects. Then u can analyze those objects and see how they are using this FM.
    I am not able to find the transaction MEI08 in my system. If u are not able to find any BAPI/FM then u can go ahead with BDC of this transaction.
    thanks,
    Vinod.

  • Using CS3 - MS-SQL/ASP - HELP USING CTE

    I am attempting to create a record set starting with cte as in my SQL statement. I have successfully ran the statement on the SQL server but DW says I need to start with a SELECT when creating a record set. Any way around this besides creating a stored procedure?
    Any help is greatly appreciated

    Thanks bregent I'll give the derived table a shot

Maybe you are looking for

  • Availability of Samsung SCX-4500W.

    This is the wireless version of the printer. I am trying to find out when this will be available in the US

  • I am trying to do a restore from iCloud on my ipad2.  As I start, it has a very old Apple ID listed. How do I change it?

    I am trying to do a restore from iCloud on my ipad2.  As I start, it has a very old Apple ID listed. How do I change it?

  • TS1398 Can't turn wifi on

    I want to update my phone to the new iOS 6, but it says that I need to be connected to wifi to download and instal. The issue is that whenever I go to the wifi button it is grey and doesn't allow me to click it or turn on wifi. PLEASE HELP!!!!!!!!

  • Multiple Instance of a Form

    Hi all,        I am using UDO in a form. This works fine for one instance. But when the user open multiple forms, it gives error. The following is the code to load the form.  Please suggest me a method that serve my purpose.                System.Xml

  • Audition CS6 Load Screen messed up

    Not sure if this is even anything to be concerrned about, but starting just a few days ago, possibly with the last windows updates, when I start Audition, the green load box/splash screen is messed up.  It looks like it is jumbled up or kind of overl