Problem with PL/SQL loop

Hi,
Here is what I am trying to do. The SQL query retrurns only one record but the loop is execuitng twice. The count returns 2. What could be the problem? Thanks for your help.
type t_name is record(id number, c_name varchar2(100));
type t_names is ref cursor return t_name
Procedure returnVal()
v_t_names t_names;
count number;
BEGIN
count : = 0;
OPEN v_t_names for select user_id, u_name from tableA WHERE dept_id = 100;
LOOP
FETCH v_t_names into t_name;
Exit when v_t_names%not found;
count := count + 1
END LOOP
END returnVal;
---------------------------------------------------------------------

After fixing the million and one errors with your example code, I turned it into the following similar so I could run it:
declare
  type t_name is record(id number, c_name varchar2(100));
  type t_names is ref cursor return t_name;
  v_t_names t_names;
  v_t_name_rec t_name;
  l_count number;
BEGIN
  l_count := 0;
  OPEN v_t_names for select 1, 'Fred' from dual;
  LOOP
    FETCH v_t_names into v_t_name_rec;
    Exit when v_t_names%notfound;
    l_count := l_count + 1;
  END LOOP;
  dbms_output.put_line(l_count);
END;
/the output was: 1.
The loop does get executed twice - the first time through it does a fetch, finds a record, so doesn't satisfy the EXIT criteria, and updates l_count, and finishes the first loop through. It must then go back to the top of the loop, and fetch another record. However, because there was only 1 record, the exit criteria is now met, so the procedure now jumps out of the loop without updating l_count. So, the loop has been entered twice.
Does that explain things?
Message was edited by:
Boneist
One thought: Since your code was so obviously an example you made up to illustrate your problem, can you guarentee that the "increment the counter" step was AFTER the "exit when cursor%notfound" step in the original?
My guess is that it's before it, so that the count goes up regardless of the cursor having fetched a row or not.

Similar Messages

  • Problems with PL/SQL packages

    Hello,
    I face the following problem with PL/SQL stored procedures. The Oracle
    version is 8.0.5 on Windows NT 4. The PL/SQL package has a set of procedures and functions.
    The main procedure of the PL/SQL package is triggered from VC++ executable. If for some reason,
    an exception is caught in the stored procedure (like no_data_found
    exception), then the following problem occurs.
    If we try to trigger the stored procedure again through the VC++ executable,
    the variables in the stored procedures have the values as in the previous
    execution. They are not getting initialised. (The same database connection
    is used in VC++ executable).
    Currently, only if a new connection to the database is used , the problem is
    solved.
    Also, change in the input parameters of the procedure is not reflected, once the procedure fails because of any exception. Only the input which was given during the time of execution when the procedure failed,is considered.
    What could be the reason for this problem and how can this be corrected?
    Please send in your suggestions.
    Thanks and Regards,
    Ramya Priya
    null

    Hi Keith,
    I am connecting to the database as the package owner..
    I have noticed earlier that I have problems when capturing triggers also.. The content of one large trigger contains 36371 characters and when capturing it from DB, the content was truncated to 28020 characters in Designer.
    Our ideas with capturing the DB packages/procedures were to use the Designer as version control system.
    We wanted to have all objects used in a project in Designer.. entities, tables, triggers, packages, procedures, Forms files, etc. in order to make a configuration for a project release.
    Thank you,
    Claudia

  • Problem with java.sql.Clob and oracle.sql.CLOB

    Hi,
    I am using oracle9i and SAP web application server. I am getClob method and storing that in java.sql.Clob and using the getClass().getName() I am getting the class name as oracle.sql.CLOB. But when I am trying to cast this to oracle.sql.CLOB i am getting ClassCastException. The code is given below
    java.sql.Clob lOracleClob = lResultSet.getClob(lColIndex + 1);
    lPrintWriter = new PrintWriter(new BufferedWriter (((oracle.sql.CLOB) lOracleClob).getCharacterOutputStream()));
    lResourceStatus = true;
    can anybody please tell me the what is the problem with this and solution.
    thanks,
    Ashok.

    Hi Ashok
    You can get a "ClassCastException" when the JVM doesn't have access to the specific class (in your case, "oracle.sql.CLOB").
    Just check your classpath and see if you are referring to the correct jar files.
    cheers
    Sameer
    PS: Please award points if you find the answer useful

  • Problem with pl/sql

    I am having a parent program which fires the child process.
    I want the parent program to wait until all the child program are completed.
    for this i have written this code.
    from the curosr c1 i am taking all the child processes.
    Now when i am putting the exit condition(EXIT WHEN J = V_COUNT1) in the for loop then
    everything is working fine and parent program completes only after all
    the child processes are completed.
    but when i am not putting this condition the parent program does not complete it remains in the loop
    i dont understand why?
    declare
    cursor c1 is
    SELECT fcr.request_id
              FROM
              fnd_concurrent_programs fcp,
              fnd_concurrent_requests fcr
              WHERE
              fcp.concurrent_program_id = fcr.concurrent_program_id
              AND fcp.concurrent_program_name LIKE 'WSHRDPIK' -- name of the pick slip report
              AND fcr.request_id > (SELECT max(fcr.request_id)
              FROM fnd_concurrent_requests fcr,
                                  fnd_concurrent_programs fcp
                                  WHERE fcp.concurrent_program_id = fcr.concurrent_program_id
                        AND fcp.concurrent_program_name LIKE 'OAI_PROCESS_SHIPMENTS')
              AND phase_code NOT LIKE 'C'
              AND requested_by IN (SELECT user_id
                   FROM fnd_user
                        WHERE user_name LIKE 'MAKANIV');
    BEGIN
    open c1;
    FETCH c1 Bulk Collect into v_count;
    close c1;
    v_count1 := v_count.count;
    for i in v_count.first..v_count.last loop
    v_success := FND_CONCURRENT.GET_REQUEST_STATUS(v_count(i)
                                            ,NULL
                                            ,NULL
                                            ,v_phase
                                            ,v_status
                                            ,v_dev_phase
                                            ,v_dev_status
                                            ,v_message);
         WHILE v_dev_phase != 'COMPLETE'
    LOOP
    v_success:= FND_CONCURRENT.WAIT_FOR_REQUEST(v_count(i)
                                       ,2
                                                 ,10
                                                 ,v_phase
                                                 ,v_status
                                                 ,v_dev_phase
                                                 ,v_dev_status
                                                 ,v_message);
         EXIT WHEN v_dev_phase = 'COMPLETE';
    END LOOP;
    -- J:= J + 1;
    -- EXIT WHEN J = V_COUNT1;
    END loop;
    END;

    Dear Salvatore,
    Have you opened the CURSOR ??
    Try the following :
    =============================================
    declare
    cursor C1 (INPUT_VAR in number) is select column1 from table where column2 =INPUT_VAR ;
    begin
    for I in C1 (1111) Loop --- you can try any number
    dbms_output.put_line(I.ID) ;
    end loop;
    end ;
    =============================================
    Bst Rgds ,
    Franco Lin
    I am new to this forum, and new to PL/SQL. I am writing my first larger project that will be in part implemented with PL/SQL. I have a simple cursor that sound like that:
    CURSOR name
    IS
    SELECT column1
    FROM table
    WHERE column2 = PL/SQL-variable;
    When I run this Function the SELECT returns nothing. When I make the same SELECT from SQL*PLUS I receive 1 row.
    I have checked the variable via dbms_output.put_line, and make the mentioned SELECT with it.
    Has anyone a solution for this?
    Thanks in advance for any help.
    Regards
    Salvatore Cagliari
    null

  • Problem with Oracle SQL Developer 3.0.04

    1. Performing a "SELECT *" on an Oracle table with a SDO_GEOMETRY column locks up the tool and I have to use Task Manager to can it.
    2. Clicking the Data tab on a table with an SDO_GEOM col either locks up the tool, or taked forever to return.
    3. Performing a "SELECT" of a SDO_GEOM col either locks up the tool or takes forever to return.
    None of these issues occur in Toad.

    If you have a problem with SQL Developer, you'd be best off posting in the SQL Developer!

  • Problem with non-stop looping

    This file has been supposedly changed from As2 to As3. It seems as if it used to stop when I first got it. But the links didn't work. When I followed troubleshooting protocols, it started looping non-stop.
    Please help. I can't seem to attach the flv and the action script files. All I get from the output window is "Fonts should be embedded for any text that may be edited at runtime, other than text with the "Use Device Fonts" setting. Use the Text > Font Embedding command to embed fonts."
    Please help. I paid a coder to switch the file from as2 to as3 and this is what he gave me...

    contact that coder and let them know the problem.  if it's a problem with their code, they should fix it without charge.

  • Compile problem with javax.sql

    I have upgraded to sdk 1.4.2 and tried to compile my code. I am getting an error on import javax.sql.* where I am getting the message "Package does not exist" error. As the result of this any class that is in this package gets an error as well. I am using ant to do the build. It does not seem to have a problem with the other import files and some of my code do compile fine except for this one that contains javax.sql.*. Thanks for your help.

    Are you sure that the javax.sql.* stuff exists in your javac classpath? It seems not to be there. Look for j2ee.jar (from Sun J2EE SDK), or something like that (something like it probably came with your app server).
    Mike

  • Problem with native SQL cursor in generic data source

    Hi, All!
    I am implementing generic data source based on FM.
    Because of complicated SQL I canu2019t use Open SQL and RSAX_BIW_GET_DATA_SIMPLE-example u201Cas isu201D.
    So, I have to use Native SQL. But Iu2019ve got a problem with a cursor. When I test my data source in RSA3, everything is Ok. But, if I start appropriate info-package, I get error u201CABAP/4 processor: DBIF_DSQL2_INVALID_CURSORu201D. It happens after selecting of 1st data package in line u201CFETCH NEXT S1 INTOu2026u201D. It seems to me that when system performs the second call of my FM the opened cursor has already been disappeared.
    Did anyone do things like this and what is incorrect?
    Is it real to make generic data source based on FM with using Native SQL open, fetch, closeu2026

    Hi Jason,
    I don't think this SQL is very valuable It is just an aggregation with some custom rules. This aggregation is performing on info-provider which consists of two info-cubes. Here we have about 2 billion records in info-provider and about 30 million records in custom db-table Z_TMP (certainly, it has indexes). I have to do this operation on 21 info-providers like this and I have to do this 20 times for each info-provider (with different values of host-variable p_GROUP)
    SELECT T.T1, SUM( T.T2 ), SUM( T.T3 ), SUM( T.T4 )
            FROM (
                    SELECT F."KEY_EVENT06088" AS T1,
                            F."/BIC/EV_COST" + F."/BIC/EV_A_COST" AS T2,
                            DECODE( D.SID_EVENTTYPE, 23147, 0,
                                                          23148, 0,
                                                          23151, 0,
                                                          23153, 0,
                                                          23157, 0,
                                                          23159, 0,
                                                          24896734, 0,
                                                          695032768, 0,
                                                          695029006, 0,
                                                          695029007, 0,
                                                          695036746, 0, F."/BIC/EV_COST") +
                              DECODE( D.SID_EVENTTYPE, 23147, 0,
                                                          23148, 0,
                                                          23151, 0,
                                                          23153, 0,
                                                          23157, 0,
                                                          23159, 0,
                                                          24896734, 0,
                                                          695032768, 0,
                                                          695029006, 0,
                                                          695029007, 0,
                                                          695036746, 0, F."/BIC/EV_A_COST") AS T3,
                            DECODE( D.SID_EVENTTYPE, 23147, F."/BIC/EV_DURAT",
                                                          23148, F."/BIC/EV_DURAT",
                                                          23151, F."/BIC/EV_DURAT",
                                                          23153, F."/BIC/EV_DURAT",
                                                          23157, F."/BIC/EV_DURAT",
                                                          23159, F."/BIC/EV_DURAT",
                                                          24896734, F."/BIC/EV_DURAT",
                                                          695032768, F."/BIC/EV_DURAT",
                                                          695029006, F."/BIC/EV_DURAT",
                                                          695029007, F."/BIC/EV_DURAT",
                                                          695036746, F."/BIC/EV_DURAT", 0) AS T4
                      FROM "/BIC/VEVENT0608F" F,
                           Z_TMP G,
                           "/BIC/DEVENT06085" D
                      WHERE F."KEY_EVENT06088" = G.ID
                            AND F."KEY_EVENT06085" = D.DIMID
                            AND G.GROUP_NO = :p_GROUP
                            AND ( F."/BIC/EV_COST" < 0 OR F."/BIC/EV_A_COST" < 0 )
                            AND D.SID_EVENTTYPE <> 695030676 AND D.SID_EVENTTYPE <> 695030678
                    UNION
                    SELECT F."KEY_EVNA06088" AS T1,
                            F."/BIC/EV_COST" + F."/BIC/EV_A_COST" AS T2,
                            DECODE( D.SID_EVENTTYPE, 23147, 0,
                                                          23148, 0,
                                                          23151, 0,
                                                          23153, 0,
                                                          23157, 0,
                                                          23159, 0,
                                                          24896734, 0,
                                                          695032768, 0,
                                                          695029006, 0,
                                                          695029007, 0,
                                                          695036746, 0, F."/BIC/EV_COST") +
                              DECODE( D.SID_EVENTTYPE, 23147, 0,
                                                          23148, 0,
                                                          23151, 0,
                                                          23153, 0,
                                                          23157, 0,
                                                          23159, 0,
                                                          24896734, 0,
                                                          695032768, 0,
                                                          695029006, 0,
                                                          695029007, 0,
                                                          695036746, 0, F."/BIC/EV_A_COST") AS T3,
                            DECODE( D.SID_EVENTTYPE, 23147, F."/BIC/EV_DURAT",
                                                          23148, F."/BIC/EV_DURAT",
                                                          23151, F."/BIC/EV_DURAT",
                                                          23153, F."/BIC/EV_DURAT",
                                                          23157, F."/BIC/EV_DURAT",
                                                          23159, F."/BIC/EV_DURAT",
                                                          24896734, F."/BIC/EV_DURAT",
                                                          695032768, F."/BIC/EV_DURAT",
                                                          695029006, F."/BIC/EV_DURAT",
                                                          695029007, F."/BIC/EV_DURAT",
                                                          695036746, F."/BIC/EV_DURAT", 0) AS T4
                    FROM "/BIC/VEVNA0608F" F,
                         Z_TMP G,
                         "/BIC/DEVNA06085" D
                    WHERE F."KEY_EVNA06088" = G.ID
                          AND F."KEY_EVNA06085" = D.DIMID
                          AND G.GROUP_NO = :p_GROUP
                          AND ( F."/BIC/EV_COST" < 0 OR F."/BIC/EV_A_COST" < 0 )
                          AND D.SID_EVENTTYPE <> 695030676 AND D.SID_EVENTTYPE <> 695030678
                 ) T
            GROUP BY T.T1

  • DB2 problems with Dynamic SQL

    Does anyone out there use dynamic SQL with DB2? If so, are the sql statements causing a PreparedStatement to be executed on DB2. I posted this question similarly before, but never resolved it, and it is killing me. I have to resolve this ASAP!
    Here is the problem: My DB2 Admin says that EVERY TIME I access the database, my Java app is causing the database to create a PreparedStatement. However, I'm using Statement objects exclusively, with dynamic SQL. He says that DB2 needs an "access path" for the client, and that it converts the Statement to a PreparedStatement, as this is the only way to get this "access path". He says the only solution is either stored procedures or SQLJ, which will do the binding in advance, and increase performance tremendously. However, I am STRONGLY opposed to using SQLJ, and if we do stored procedures, we'd have to write one for every possible SQL statment! I KNOW there is a better solution.
    Is anyone out there having these problems with JDBC and DB2? Surely someone out there uses DB2 and JDBC and either has these problems or can confirm that something is incorrectly configured on the database side.
    Any help would be great. Thanks, Will

    Now I'm wondering if maybe the PreparedStatements are ONLY being called on the database when I call getConnection(), and not when I call executeQuery() or executeUpdate() from the Statement object. I just can't see why the database would have to make an access path for every SQL statement executed, but I could see it creating an access path for every connection requested. Any thoughts on that theory?

  • Problem with MS SQL 2005 JDBC Conection

    Dear all,
    I am new user of MS SQL Server 2005 database and Java developer.
    When I conect to MS SQL Server 2005 i have a problem with conection.
    First I creat new class named DaoTest to test MS SQL conection.
    Here I show my code complete.
    {color:#0000ff}
    import java.sql.Connection;
    import java.sql.Statement;
    import com.microsoft.sqlserver.jdbc.SQLServerDataSource;
    public class DaoTest {
    private Connection connection;
    public DaoTest() {
    try {
    Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
    SQLServerDataSource ds = new SQLServerDataSource();
    ds.setUser("sa");
    ds.setPassword("deanweb");
    ds.setServerName("localhost");
    ds.setPortNumber(1434);
    ds.setDatabaseName("common");
    connection= ds.getConnection();
    } catch (Exception e) {
    e.printStackTrace();
    public static void main(String[] args) throws Exception {
    DaoTest daoTest1 = new DaoTest();
    DaoTest daoTest2 = new DaoTest();
    }{color}
    {color:#000000}and when I run this class a error appeared:{color}
    {color:#ff0000}com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(Unknown Source)
    at com.microsoft.sqlserver.jdbc.TDSChannel.read(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.Prelogin(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerDataSource.getConnectionInternal(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerDataSource.getConnection(Unknown Source)
    at DaoTest.<init>(DaoTest.java:21)
    at DaoTest.main(DaoTest.java:32)
    {color:#000000}But when i change main methol as{color}:
    {color}{color:#0000ff}public static void main(String[] args) throws Exception {
    DaoTest daoTest1 = new DaoTest();
    daoTest1.connection.close();
    DaoTest daoTest2 = new DaoTest();
    }{color}
    ->>successful.
    {color:#ff0000}{color:#000000}That mean I {color}**can not**{color} creat more than one instance of class DaoTest if i do not close {color:#000000}*daoTest1*'{color}s conection.
    I only see this error with MS SQL Server,none in Postgres or HSQL.
    Please help me.
    Thank for reading and I am waiting for your reply.
    sorry my english.
    [email protected]
    Edited by: DrNhut on Jun 24, 2008 3:39 AM
    Edited by: DrNhut on Jun 24, 2008 3:44 AM

    Thank you.
    I try your code but it didn't work.
    So,here my code with your opinion
    String connectionUrl = "jdbc:sqlserver://localhost:1434;"
                   + "databaseName=common;selectMethod=cursor;";
    //                Declare the JDBC objects.
                   Connection con = null;
                   Statement stmt = null;
                   ResultSet rs = null;
                   try {
    //                Establish the connection.
                   Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
                   con = DriverManager.getConnection(connectionUrl,"sa","deanweb");
                   } catch (Exception e) {
                   e.printStackTrace();
         public static void main(String[] args) throws Exception {
              DaoTest daoTest1 = new DaoTest();
              // daoTest1.connection.close();
              DaoTest daoTest2 = new DaoTest();
         }It throws same error with my last posted.
    I can't use your code exactlyString connectionUrl = "jdbc:sqlserver://localhost:1434/common;selectMethod=cursor";because it throws a new exception:com.microsoft.sqlserver.jdbc.SQLServerException: The port number 1434/common is not valid.
         at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
         at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)
         at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
         at java.sql.DriverManager.getConnection(DriverManager.java:582)
         at java.sql.DriverManager.getConnection(DriverManager.java:185)May be I change my DBMS instead of MS SQL 2005.
    (I nead a database can manage big data.So,I choose MS SQL).
    thank you.
    DrNhut.
    Edited by: DrNhut on Jun 25, 2008 6:39 PM

  • Problems with a closed loop

    I will briefly describe what i am doing, but my problem is not with any hardware it is with programming iterative loops in labVIEW.
    What i am trying to do is get the input for an activex aircraft instrument. The attitude data is coming from an inertial sensor connected directly to com1. The activeX instrument that is causing problems is a turn coordinator. Which, in real life, includes a ball in a curved tube surrounded by a viscous liquid, sort of like a spirit level. I need to determine the position of this virtual ball based on the real acceleration data. My initial thoughts were, and would be possible in another language, start with an initial ball position. Using this initial position and body axis acceleration calculate th
    e tangential acceleration present on the ball and from this calculate the distance travelled in a small period of time. This short distance would then be added to the inital position to find the new position. The procedure would then start over with this new position. However i cannot just join the wires in labVIEW up like this as i get an error saying there is a closed loop that cannot be executed.
    Can anyone tell me how to construct a loop that uses an inital value which is then used in a calculation to update that inital value? Please find attached my very poor attempt at this VI. I hope things will be clearer by looking at my first attempt, and someone will be able to tell me what i am doing wrong
    Phil
    Attachments:
    TCtest.vi ‏102 KB

    Hello Laura,
    Basically what you'll want to do to get stated is to register your ActiveX object with the operating system. If the supplier's documentation of how to register is not complete, then I would suggest you take a look at the knowledgebase discussing manual registration of ActiveX objects.  
    Once the object is registered, you can open an ActiveX reference using the Automation Open VI on the block diagram. The registered object will show up as a selectable class in the class browser when you right click on the automation refnum. Now with the automation reference, you can use property and invoke nodes to interface with your remote control device. For an overview of ActiveX use in LabVIEW, please take a look at the linked application note. I hope this information is useful for you!
    Mike D.
    National Instruments
    Applications Engineer

  • CONNECT BY, Performance problems with hierarchical SQL

    Hello,
    I have a performance problem with the following SQL:
    table name: testtable
    columns: colA, colB, colC, colD, colE, colF
    Following hierarchical SQL:
    SELECT colA||colB||colC AS A1, colD||colE||colF AS B1, colA, colB, colC, level
    FROM testable
    CONNECT BY PRIOR A1 = B1
    START WITH A1 = 'aaa||bbbb||cccc'
    With big tables the performance of this construct is very bad. I can't use functional based indexes to create an Index on "colA||colB||colC" and "colD||colE||colF"
    Has anyone an idea how I can get a real better performance for this hierarchical construct, if I have to combine multiple colums? Or is there any better way (with an PL/SQL or view trigger) solve something like this ??
    Thanks in advance for your investigation :)
    Carmen

    Why not
    CONNECT BY PRIOR colA = colD
    and PRIOR colB = colE
    and ...
    ? It is not the same thing, but I suspect my version is correct:-)

  • EA 2.1: Some problems with PL/SQL objects

    SQL Developer 2.1
    JDK 1.6_0.16
    Windows XP
    Some features for PL/SQL objects (packages, functions, procedures) do not work in EA 2.1.
    *1. User defined editor extensions*
    My user defined extensions for PL/SQL objects are not loaded. These extensions are migrated from 1.5, where I added some tab pages to the editor.
    *2. Go to <object name> does not work for PL/SQL objects*
    From Reports the context menu shows the menu option "Go to ....".
    This doesn't work for PL/SQL objects.
    For example All Reports > Data Dictionary Reports > PLSQL > Progam Unit Arguments
    *3. Open declaration for PL/SQL objects*
    Selecting an objectname in the PL/SQL editor and select "Open declaration" from context menu opens the selected object. This works for tables, bu tnot for PL/SQL objects.

    Vadim,
    In version 2.1 RC1 (2.1.0.63.41) I still have problems with the PL/SQL editor.
    Will these be solved in the final version?
    I was searching bug no. 8967961 in My Oracle Support, but was not able to find it. Where can I find this bug?
    Problems in RC1:
    *1. User defined extensions are not shown in PL/SQL editor.*
    This problem is introduced in 2.1 EA1 and still exists in RC1.
    *2. Pop-up describe for a pl/sql object shows only the user defined tab pages*
    Select the name of a PL/SQL object in the editor, right click and choose "Popup describe". The default tab pages are not shown, only the tab pages added by User Defined Extensions.
    *3. "Go to ...." option does not go to specific line number*
    Use Report Data Dictionary Reports > PLSQL > Search Source Code. In the results, right click on an object and choose the "Go to .... " option. The editor doesn't go to the correct line. The pseudo column sdev_link_line has no effect.

  • Problems with PL/SQL Calling Java Function that returns String []

    Hi,
    I have written the following code. It's not compiling OK.
    DECLARE
    TYPE Tokens_Type IS VARYING ARRAY(20) OF VARCHAR2(20);
    s1 Tokens_Type DEFAULT NULL;
    SQL_STR VARCHAR2(2000) DEFAULT NULL;
    BEGIN
    SQL_STR := 'CREATE OR REPLACE FUNCTION Schema1.SPLIT_STR (S2 VARCHAR2(20)) ' ||
    'RETURN s1 ' ||
    'AS LANGUAGE JAVA ' ||
    'NAME ''String_Mani.split_it (String) return java.lang.String []''';
    EXECUTE IMMEDIATE SQL_STR;
    END;
    What's the problem with this?

    You cannot create a function with a locally defined return type. As soon as this script is executed, Oracle no longer knows what the TOKEN_TYPE type is any more, so the function will be invalid.
    You need to use a collection type defined at the database level or defined in a package - somewhere where it will persist.

  • Problem with XML SQL  JDBC adapter

    Hello All.
    I have quite strange problem with my PI.
    Whole scenario is SOAP -> JDBC, asynchronous. Everything works fine on DEV server. After transporting objects (using CTS) to QA env I'm getting this error:
    JDBC Message processing failed, due to Error processing request in sax parser:
    No 'action' attribute found in XML document
    (attribute "action" missing or wrong XML structure)
    But document seems to be correct. I've compared it to DEV server documents - they are identical. What could be wrong??
    Document looks like this:
    <ns2:BIPMessage xmlns:ns2="http://mynamespace.com/xi/sn"
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <synchSlLok>
       <STATEMENTNAME>
         <SYNCH_SL_LOK ACTION="INSERT">
            <TABLE>SYNCH_SL_LOK</TABLE>
             <ACCESS>
                <ID_TRANS>22050</ID_TRANS>
                <ID_LOK>1234</ID_LOK>
                <ID_CBK>1000050911</ID_CBK>
                <NR_LOK>1234</NR_LOK>
                <OPIS_LOK>12312312312312</OPIS_LOK>
                <TYP>D</TYP>
                <OPERACJA>U</OPERACJA>
              </ACCESS>
          </SYNCH_SL_LOK>
        </STATEMENTNAME>
      </synchSlLok>
      </ns2:BIPMessage>
    TIA
    Best Regads
    Maciej

    Hi,
    i was also facing the same error few days back in a JDBC -RFC-JDBC Synchronous scenario. In that scenario, i was using 2 modules in JDBC sender module tab. It was working fine. later i change polling interval and then i started getting same error. it happened coz of sequence of Module got changed somehow.
    So please check in Receiver JDBC adapter and SOAP sender adapter CC  if anything is changed. If this scenario is working in DEV as it is then it should work after transport.
    Else have a look here
    Re: attribute "action" missing or wrong XML structure
    JDBC - No 'action' attribute found in XML document - error
    Regards
    Aashish Sinha
    Edited by: Aashish Sinha on Mar 15, 2011 10:42 AM

Maybe you are looking for

  • User profile service incremental sync failure

    Hi all, I'm working for a client that has a failing UPS incremental sync. The scheduled sync was running fine until a couple of weeks ago when it suddenly stopped working. Coincidently, this was also at the same time that they noticed the incremental

  • [SOLVED] can't get flash to work

    First i tried copying the flashplayer.so to /usr/lib/mozilla/plugins dir, but it didnt exists yet, so i did a searh and i found. This http://wiki.archlinux.org/index.php/Ins - bit_System  tried installing nspluginwrapper but it didnt work after resta

  • HI,I am unable to see all the tabs in ACC, getting the following error

    I am unable to see all the tabs in ACC, getting the following error. ERROR [ComponentAgent] Request for URL: http://sathya-PC:8080/dyn/init-session did not return a valid session. Please check your settings for siteHttpServerName, siteHttpServerPort,

  • Escape character for apostrophe ' in JDBC receiver channel

    Hi all, We have Proxy to JDBC scenario in our project. This interface is working fine with unicode data but when there is an apostrophe( ' ) coming in any of the field values ( ex: DOWTHERM 'J' MODEL19QAGB1G ) , the message is failing in receiver JDB

  • Mail & AOL Address Books

    I set up Mail and it is working fine. My only problem is that he combined all of the addresses in my two AOL accounts and these are now combined as a whole in each of the AOL accounts as well. So, I can access all of my contacts in each screen name,