Stored Procedure in UCCX 8.x

  Pardon the simplicity of the question but we had a question arise that I am unable to find a solution in previous posts or in guides and I am not a programmer.  Customer wrote their scritping for UCCX 7 in Java because they had requirements for mutiple input variables being sent to a stored procedure  then returing multiple variables. Does version 8.X now support the multiple variables?          

I'm pasting your code in proper format - so that everyone can understand what you have posted here.
create or replace PROCEDURE Sp06_Rel_Acoes_Usuario (dt_inicio IN VARCHAR2,
                                                    dt_fim IN VARCHAR2,
                                                    filtro IN VARCHAR2,
                                                    v_cursor OUT sys_refcursor)
IS
BEGIN
  OPEN v_cursor FOR
  SELECT A.AD013_DTOCORRENCIA,
         A.AS013_APLICATIVO,
         A.AS002_CDUSUARIO,
         A.AS013_DADOADICIONAL,
         AC.AS012_DSACAO
  FROM T013_ACAOUSUARIO A, T012_ACAO AC
  WHERE A.AD013_DTOCORRENCIA BETWEEN TO_DATE(dt_inicio,'dd/mm/yyyy HH24:MI:SS')
  AND TO_DATE(dt_fim,'dd/mm/yyyy HH24:MI:SS')
  AND A.AS002_CDUSUARIO = filtro
  AND A.AN012_CDACAO = AC.AN012_CDACAO
  ORDER BY A.AD013_DTOCORRENCIA;
END;Try to post script in proper format. It will be easier for everyone to go through your problem and debug it.
Regards.
Satyaki De.

Similar Messages

  • Need Help in with Querying Stored Procedures from UCCX Database

    Hi All
    We are trying to build a custom reporting solution using a BI tool and for which we have provided the ODBC connectivity to the UCCX database to our SQL server.
    We have installed the ODBC drivers on our SQL server and made a connection to UCCX version 10.0 successfully. we are using the username 'uccxhruser' to connect to the DSN.
    We want to query the stored procedure sp_csq_activity from the Microsoft SQL Server Management Studio. When we add the Linked Server in the SQL Server, we are able to see the Data Tables and also query them using the select statement. However, we are not able to see any of the Stored procedures within the Linked Server Tab.
    Can someone guide us in the right direction as to how to go about the process. Is calling the stored proedure the right way or we need to query the individual tables as mentioned in the Database Schema Guide and then once the historical tables our there in our server , then build the report.
    Any help will be much appreciated.
    Regards
    Abhinav

    Hi,
    what happens if you try to execute the above SP? They should be accessible AFAIK.
    G.

  • UCCX 8 Custom report - stored procedure

    I'm porting over a custom UCCX 5 historical report to UCCX 8. I'm trying to port the stored procedure to informix but some of the helper routines such as getRoutingSkills(), getRestrictedDate() and parse2() are all restricted and I don't have permission to grant access to the report user.
    A call to one of these functions generate the error message "SQL Error (getrestricteddate) cannot be resolved."
    I'm logging in to the informix database with the uccxhruser account and I don't know of any other account with elevated privilege that I can use for development.
    My question is there any documentation on security requirements for creating stored procedures for UCCX 8? What do i need to do to gain access to the functions listed above? Do i need to re-create these helper routines myself?
    Please advise.
    Thanks
    Chris

    I've noticed there's a database user named "uccxuser" with privilege set to "DBA".  I believe this is the account i should be using to create my stored procedures but I don't know the password to it.  Does anyone know how custom stored procedures should be created on uccx 8's database and which account we should be use?
    Thanks
    Chris

  • UCCX 8.5 - Accessing stored procedure result

    Hi,
    I am trying to access a stored procedure through UCCX script.
    I can access a stored procedure by following SQL query through DBRead step and it is successfully getting executed.
    DECLARE         @return_value int,
                            @Result int;
                EXEC        @return_value = [dbo].[SP_ValidateUser]
                                @ContactPersonId =$input1 ,
                                @ContactPersonTypeid = $input2 ,
                                @Result = @Result OUTPUT;
             SELECT        @Result as '@Result'
    I have to get the output of stored procedure in UCCX script variable. Is there any way to get it through DBGet Step.
    Any help regarding this is greatly appreciated.
    Thanks,
    Indumathi.P

    Hi Indumathi,
    Have you got a response to this? I am also looking for a solution to get the output of Stored procedure in my UCCX local script variable. Can you kindly provide me with the script solution?
    Thank you
    Regards
    Jeesh

  • Trying to get a return value from a Stored Procedure

    Hi folks,
    I have been tasked with something I thought was simple, but apparently its not that simple.  I am trying to call a Stored Procedure in UCCX that will do some calculations and returns back an integer value.  The stored procedure call I have is:
    DECLARE @return_status int
    EXEC @return_status = dbo.CTTLoginPhone @CTTId = $EmployeeID , @PIN = $EmployeePIN , @PhoneNumber = $CallingPhoneNumber ;SELECT 'Return_Status' = @return_status
    When I run this in this the editor, I get back one row.  If I run this in the debugger, I do not get any errors back and the stored procedure runs fine, however the Return_Status is not set either.  What am I doing wrong?
    I have defined Return_Status with intial value of 0 and the stored proc should be returning back 1 or 2, but the Return_Status remains as 0
    Can someone please let me know if I need a DB GET after a DB READ or can I just use the DB READ standalone when calling stored procedure.
    All help will be really appreciated.
    Thank you.

    I am having the same issue here... any help would be greatly appreciated. I am on UCCX 8
    I am getting 1 row returned when I click "TEST" in the READ step but the DB GET step is going into the SQL Error branch.
    Here are some details and I have attached screen shots of my script DB steps.....
    I have a Stored Procedure that is very simple...
    CREATE PROCEDURE sp_test AS
    Select 'N';
    GO
    Ive created a dummy table with 1 field..
    TABLE: testTable
    FIELD: code
    Let me know if there are any more details I can provide....

  • UCCX 9.0 using CUIC - Accessing Custom Stored Procedure

    Hello,
    We recently upgraded to UCCX 9.0 to take advantage of CUIC.  So far it's been going well but we had a custom report that we used on the old HR client.  It was a copy of the Agent Call Summary report that called a different stored procedure.  It was easy enough to create for the HR client.  The only difference between the SP's is that the custom one doesn't count outbound calls under 5 digits so it excludeds any internal calls.  I've tried exporting the Agent Call Summary report in CUIC and importing a new one but I can't get it to change what SP is called.  Does anyone have any idea how I can get this to work?  I've seen other threads that suggest that a stand alone copy of CUIC Premium is needed but I was hoping it wasn't since it's a fairly simple change.
    Thanks,
    Eric

    Hello,
    Any change to the storeprocedure or database access will require the premium version since the standard doesn't have the option to see the report definition.
    If you have a LAB of CUIC, it comes with premium version for partners with only 1000 USD, you can use it and export the report and then import it to the customer, this how i usually do for small changes, other than that the customer is required to buy the premium version.
    Amer

  • UCCX 9 web services / Stored Procedure

    I'll appreciate if you guys can help me on this...   Our application group already created automated bill payment web site.  I would like to do similar things by using UCCX 9.  When customers call, they enter Customer ID, credit card/check number and amount of bill they want to pay...etc...   Our Application guy asked me to find out if UCCX can call web services or if UCCX can pass values to Stored procedure.   The question is what steps/functions do I need to accomplish this task?   Please advise...
    Thank you,
    Nana

    Hi Nana
    Web Services: You can create custom Java code to connect to the web services, or use other methods. Here's some examples:
    https://supportforums.cisco.com/thread/270279
    https://supportforums.cisco.com/thread/2143901
    Stored Procs: Looks like this is also possible though I've not done it myself :
    https://supportforums.cisco.com/thread/2079597
    Regards
    Aaron

  • UCCX 8 - Custom Stored Procedure Not Functioning

    Hello,
    We're trying to modify one of the agent summary reports in UCCX 8.  We want the outbound report to only show numbers that were external calls.  (Longer than 4 digits.)  We copied and modified the existing stored procedure and it seems to run ok until we try to use it in the historical reporter.  HR reports that the stored procedure cannot be found.  We've followed what documentation we could find about adding one but can't get it working.  We've been using ASG Server Studio to access the database.  We opened a TAC case but haven't gotten anywhere.  Here's the detail we gave them.
    /* Style Definitions */
    table.MsoNormalTable
    {mso-style-name:"Table Normal";
    mso-tstyle-rowband-size:0;
    mso-tstyle-colband-size:0;
    mso-style-noshow:yes;
    mso-style-priority:99;
    mso-style-qformat:yes;
    mso-style-parent:"";
    mso-padding-alt:0in 5.4pt 0in 5.4pt;
    mso-para-margin:0in;
    mso-para-margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:11.0pt;
    font-family:"Calibri","sans-serif";
    mso-ascii-font-family:Calibri;
    mso-ascii-theme-font:minor-latin;
    mso-fareast-font-family:"Times New Roman";
    mso-fareast-theme-font:minor-fareast;
    mso-hansi-font-family:Calibri;
    mso-hansi-theme-font:minor-latin;
    mso-bidi-font-family:"Times New Roman";
    mso-bidi-theme-font:minor-bidi;}
    I have created a stored procedure on the informix DB for UCCX 8. i have
    been following the Historical reporting admin guide. the SP runs fine when i use ASG
    server studio. when i try to use crystal reports to access the SP i get "Failed to
    retrieve data from the database. Details: ADO Error code 0x80004005 Source: Microsoft OLE
    DB Provider for ODBC Drivers Description: [Informix][Informix ODBC Driver][Informix]
    Routine (sp_agent_call_summar_nointernal) can not be resolved. SQL State:S1000"
    if i use a standard procedure Crystal Reports works fine.
    i have the uccxHrUserRole assigned to the procedure so i do not understand why i cannot
    run the SP.
    Any ideas, we really need to get this working.
    Thanks!

    Hi
    1) There are an impressive number of bugs in early 8.0 versions; on the initial release permissions were incorrect for the existing SPs so the uccxHrUser couldn't run them. You could copy them, so had to copy them and run the copies.. tedious.
    If you are on a working version, the other gotcha is that you need to specify them fully-qualified - so sp-test would be  db_cra.dbo.sp_test
    Also note that the SPs are randomly split between 'functions' and 'procedures' (there may be a pattern, but I can't work it). Both are similar, but there is a field in the DB that marks a proc as a fucntion or a procedure - the informix Squirrel SQL  plugin doesn't work well with this and just shows the ones marked as 'procedures'. I've had better luck with RazorSQL and have recently played  with the free IBM Data Studio which I think also displayed them all.
    2) You can't edit the permissions of existing ones, but you can add new ones and since you (well, uccxHrUser) is the owner you can set permissions on those. Try using RazorSQL or AGS Server Studio (which is better, but $$$) to add new procs.
    Aaron
    Please ratre helpful posts..

  • Get variable values from a stored procedure

    I am using SQL 2008R2 and I want to replace a view inside a stored procedure with a new stored procedure to return multiple variable values. Currently I am using the code below to get values for 4 different variables.  I would rather get the 4 variables
    from a stored procedure (which returns all of these 4 values and more) but not sure how to do so.  Below is the code for getting the 4 variable values in my current sp.
    DECLARE @TotalCarb real;
    DECLARE @TotalPro real;
    DECLARE @TotalFat real;
    DECLARE @TotalLiquid real;
    SELECT @TotalCarb = ISNULL(TotCarb,0),
    @TotalPro = ISNULL(TotPro,0),
    @TotalFat = ISNULL(TotFat,0),
    @TotalLiquid = ISNULL(TotLiq,0)
    FROM dbo.vw_ActualFoodTotals
    WHERE (MealID = @MealID);

    You can replace the view with inline table valued user-defined function:
    http://www.sqlusa.com/bestpractices/training/scripts/userdefinedfunction/
    See example: SQL create  INLINE table-valued function like a parametrized view
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Pointbase : How can I create a stored procedure with Pointbase database?

    Hello,
    Excuse me for my english, I'm not anglophone. I try to create a stored procedure.
    This is my file SampleExternalMethods.java :
      import java.sql.*;    //import com.pointbase.jdbc.jdbcInOutDoubleWrapper;          public class SampleExternalMethods    {      // A connection object to allow database callback      static Connection conn = null;      static Statement l_stmt;      static Statement m_stmt;      static CallableStatement m_callStmt = null;      static ResultSet l_rs = null;          public static void main(String[] args)      {        try        {          String url = "jdbc:pointbase:server://localhost/pointbaseDB";          String username = "PBPUBLIC";          String password = "PBPUBLIC";          conn = DriverManager.getConnection(url, username, password);          doCreateProcedure();          doInvokeProcedure();        } catch (SQLException e) {          e.printStackTrace();        } finally {          if (m_stmt != null) {            try {              m_stmt.close();            } catch (Exception e) {              e.printStackTrace();            }          }          if (m_callStmt != null) {            try {              m_callStmt.close();            } catch (Exception e) {              e.printStackTrace();            }          }          if (conn != null) {            try {              conn.close();            } catch (Exception e) {              e.printStackTrace();            }          }        }      }                  public static void getCountry(String Iso_Code)      {        try        {          // Query the database for the country iso code          l_stmt = conn.createStatement();          l_rs = l_stmt.executeQuery( "SELECT * FROM countries"          + " WHERE country_iso_code ='" + Iso_Code + "'");          //Affichage du résultat de la requête          l_rs.next();          System.out.print(l_rs.getString(1) + " - ");          System.out.print(l_rs.getString(2) + " - ");          System.out.println(l_rs.getString(3));          // Close the result set          l_rs.close();        } catch (SQLException e) {          e.printStackTrace();        } finally {          if (l_rs != null) {            try {              l_rs.close();            } catch (Exception e) {              e.printStackTrace();            }          }          if (l_stmt != null) {            try {              l_stmt.close();            } catch (Exception e) {              e.printStackTrace();            }          }        }      }            public static void doCreateProcedure() throws SQLException {        // SQL statement to create a stored procedure        String SQL_CREATE_PROC = "CREATE PROCEDURE getCountry(IN P1 VARCHAR(30))"        + " LANGUAGE JAVA"        + " SPECIFIC getCountry"        + " NO SQL"        + " EXTERNAL NAME \"SampleExternalMethods::getCountry\""        + " PARAMETER STYLE SQL";        // Create a SQL statement        m_stmt = conn.createStatement();        // Execute the SQL        m_stmt.executeUpdate(SQL_CREATE_PROC);        // Close the statement        //m_stmt.close();      }          public static void doInvokeProcedure() throws SQLException {        // Create SQL to invoke stored procedures        String SQL_USE_PROC = "{ call getCountry(?) }";        // Create a callable statement with three binding parameters        m_callStmt = conn.prepareCall(SQL_USE_PROC);        m_callStmt.setString(1, "CA");        m_callStmt.executeQuery();        // Close the callable statement        //m_callStmt.close();      }    } 
    Afterwards, I have read this note in a Pointbase document:
    To invoke the dateConvert external Java method from a stored function, you must use the
    CREATE FUNCTION statement. The dateConvert external Java method is called from the
    class, SampleExternalMethods.
    In order for the database to access this external Java method, the class SampleExternalMethods
    must be included in the database CLASSPATH. For PointBase Embedded - Server Option, it
    must be in the Server CLASSPATH, but not in the Client CLASSPATH.
    If PointBase Server is run with the Java Security Manager, in the java policy file grant
    ’com.pointbase.sp.spPermission’ to the class that implements the external Java method.
    An "spPermission" consists of a class name with no action. The class name is a name of a class
    that could be used in creating a Stored Procedure in PointBase. The naming convention follows
    the hierarchical property naming convention and that is supported by
    "java.security.BasicPermission". An asterisk may appear by itself, or if immediately preceded
    by ".", may appear at the end of the name, to signify a wildcard match. The name cannot
    contain any white spaces.
    I'm not sure, but I suppose that I must include the class SampleExternalMethods in a .jar file.
    The database CLASSPATH could be : C:\Sun\AppServer\pointbase\lib\
    These my files in this database CLASSPATH:
    pbclient.jar
    pbembedded.jar
    pbtools.jar
    pbupgrade.jar
    I have tryed to include the class SampleExternalMethods in pbclient.jar and pbembedded.jar with this command:
    jar -uf pbembedded.jar SampleExternalMethods
    Afterwards I do that,
    1) Start Pointbase
    2) Configuration of classpath
    set classpath=C:\Sun\AppServer\pointbase\lib\pbclient.jar
    set classpath=%classpath%;D:\J2EE\Ch07Code\Ch07_06
    I precise that my file SampleExternalMethods is into D:\J2EE\Ch07Code\Ch07_06\Ch07.
    Then, I run the program:
    D:\J2EE\Ch07Code\Ch07_06>java -Djdbc.drivers=com.pointbase.jdbc.jdbcUniversalDriver Ch07.SampleExternalMethods
    But I have an error message:
    Exception in thread "main" java.lang.NoClassDefFoundError: Ch07.SampleExternalMethods (wrong name: SampleExternalMethods)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.DefineClass(ClassLoader.java:539)
    The problem, I suppose, comes from that the class SampleExternalMethods
    must be included in the database CLASSPATH, but there is a pbserver.jar with pointbase normally, but I didn't find it. That's why I use pbembedded.jar or pbclient.jar in order to include the class SampleExternalMethods. May be I must start from C:\Sun\AppServer\pointbase\lib\ instead of D:\J2EE\Ch07Code\Ch07_06\Ch07?
    Please, can somebody helps me?
    Thank you in advance.
    cagou!

    jschell wrote:
    And I doubt you can recurse like that for embedded java. You must have a class that does the functionality and another class that creates the proc.
    >And I doubt you can recurse like that for embedded java. You must have a class that does the functionality and another class that creates the proc.
    >
    And I doubt you can recurse like that for embedded java. You must have a class that does the functionality and another class that creates the proc.
    Thank you for your response, I have done two classes:
    SampleExternalMethods.java:
    package Ch07;
    import java.sql.*;*
    *public class SampleExternalMethods*
    *public static void getCountry(String Iso_Code)*
    *// A connection object to allow database callback*
    *Connection l_conn = null;*
    *Statement l_stmt = null;*
    *ResultSet l_rs = null;*
    *try*
    *String url = "jdbc:pointbase:server://localhost/pointbaseDB";*
    *String username = "PBPUBLIC";*
    *String password = "PBPUBLIC";*
    *l_conn = DriverManager.getConnection(url, username, password);*
    *// Query the database for the country iso code*
    *l_stmt = l_conn.createStatement();*
    *l_rs = l_stmt.executeQuery( "SELECT* FROM PBPUBLIC.COUNTRIES"
    +" WHERE country_iso_code ='"+ Iso_Code +"'");+
    +//Affichage du résultat de la requête+
    +l_rs.next();+
    +System.out.print(l_rs.getString(1)+ " - ");
    System.out.print(l_rs.getString(2) +" - ");+
    +System.out.println(l_rs.getString(3));+
    +// Close the result set+
    +l_rs.close();+
    +} catch (SQLException e) {+
    +e.printStackTrace();+
    +} finally {+
    +if (l_rs != null) {+
    +try {+
    +l_rs.close();+
    +} catch (Exception e) {+
    +e.printStackTrace();+
    +}+
    +}+
    +if (l_stmt != null) {+
    +try {+
    +l_stmt.close();+
    +} catch (Exception e) {+
    +e.printStackTrace();+
    +}+
    +}+
    +if (l_conn != null) {+
    +try {+
    +l_conn.close();+
    +} catch (Exception e) {+
    +e.printStackTrace();+
    +}+
    +}+
    +}+
    +}+
    +}+
    CreateMethods.java:
    +package Ch07;+
    +import java.sql.*;+
    +public class CreateMethods+
    +{+
    +// A connection object to allow database callback+
    +static Connection m_conn = null;+
    +static Statement m_stmt;+
    +static CallableStatement m_callStmt = null;+
    +public static void main(String[] args)+
    +{+
    +try+
    +{+
    +String url = "jdbc:pointbase:server://localhost/pointbaseDB";+
    +String username = "PBPUBLIC";+
    +String password = "PBPUBLIC";+
    +m_conn = DriverManager.getConnection(url, username, password);+
    +doCreateProcedure();+
    +doInvokeProcedure();+
    +} catch (SQLException e) {+
    +e.printStackTrace();+
    +} finally {+
    +if (m_stmt != null) {+
    +try {+
    +m_stmt.close();+
    +} catch (Exception e) {+
    +e.printStackTrace();+
    +}+
    +}+
    +if (m_callStmt != null) {+
    +try {+
    +m_callStmt.close();+
    +} catch (Exception e) {+
    +e.printStackTrace();+
    +}+
    +}+
    +if (m_conn != null) {+
    +try {+
    +m_conn.close();+
    +} catch (Exception e) {+
    +e.printStackTrace();+
    +}+
    +}+
    +}+
    +}+
    +public static void doCreateProcedure() throws SQLException {+
    +// SQL statement to create a stored procedure+
    +String SQL_CREATE_PROC = "CREATE PROCEDURE PBPUBLIC.getCountry(IN P1 VARCHAR(30))"+
    " LANGUAGE JAVA"
    +" SPECIFIC getCountry"+
    " NO SQL"
    +" EXTERNAL NAME \"SampleExternalMethods::getCountry\""+
    " PARAMETER STYLE SQL";
    // Create a SQL statement
    m_stmt = m_conn.createStatement();
    // Execute the SQL
    m_stmt.executeUpdate(SQL_CREATE_PROC);
    // Close the statement
    //m_stmt.close();
    public static void doInvokeProcedure() throws SQLException {
    // Create SQL to invoke stored procedures
    String SQL_USE_PROC = "{ call getCountry(?) }";
    // Create a callable statement with three binding parameters
    m_callStmt = m_conn.prepareCall(SQL_USE_PROC);
    m_callStmt.setString(2, "CA");
    m_callStmt.executeQuery();
    // Close the callable statement
    //m_callStmt.close();
    }But I have the same error message that previously.
    I have read this note and I suppose that the problem is linked:
    If PointBase Server is run with the Java Security Manager, in the java policy file grant
    *’com.pointbase.sp.spPermission’ to the class that implements the external Java method.*
    An "spPermission" consists of a class name with no action. The class name is a name of a class
    that could be used in creating a Stored Procedure in PointBase. The naming convention follows
    the hierarchical property naming convention and that is supported by
    *"java.security.BasicPermission". An asterisk may appear by itself, or if immediately preceded*
    by ".", may appear at the end of the name, to signify a wildcard match. The name cannot
    contain any white spaces.
    Can you explain me what I must to do in order to solve this problem of spPermission.
    Thanks.

  • How to view the returned data from a stored procedure in TOAD?

    Hi,
    I created ref cursor in the stored procedure to return data. The stored procedure works fine, just want to view the result in TOAD. The BEGIN... EXEC... END can execute the stored procedure, but how to make the result display?
    Thanks!

    Right click the editor and choose
    "Prompt For Substitution Variables".
    Run for example the following code:
    DECLARE
    PROCEDURE p (cur OUT sys_refcursor)
    AS
    BEGIN
    OPEN cur FOR
    SELECT *
    FROM DUAL;
    END p;
    BEGIN
    p (:cur);
    END;
    The result will display in Toad's Data Grid!
    Regards Michael

  • Error while running a stored procedure in SBO

    Hi all,
    i have a stored procedure that i run in my sbo.  When i run the stored procedure i get the following error :
    1). [Microsoft][SQL Server Native Client 10.0][SQL Server]Warning: Null value is eliminated by an aggregate or other SET operation.
    'Servicecontracten' (OCTR)    05/10/2011  18:03:36  -1
    i launch my sp like this :
    exec [spu_DS_HistProjektUserVeldenViewBetalingen]  (i pass no parameters while testing.  i put them fix in my sp)
    my stored procedure looks like this :
    USE [def1]
    GO
    /****** Object:  StoredProcedure [dbo].[spu_DS_HistProjektUserVeldenViewBetalingen]    Script Date: 10/05/2011 18:03:05 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    -- Batch submitted through debugger: SQLQuery2.sql|8|0|C:\Users\kvanhauwaert\AppData\Local\Temp\~vs2A98.sql
    ALTER PROCEDURE [dbo].[spu_DS_HistProjektUserVeldenViewBetalingen]
              /* @project_number varchar(20),
              @billperiod_type varchar(10) */
    AS
    BEGIN
         SELECT isnull(lijnnr,0) as lijnnr, isnull(fase,'') as fase, isnull(factuurbedrag,0) as factuurbedrag,
         isnull(billperiod_type,'') as billperiod_type
         INTO #tempDS_HistProjektUserVeldenViewBetalingen
         FROM DS_HistProjektUserVeldenViewBetalingen t1
         WHERE project_number = '08053A'
         SELECT  isnull(lijnnr,0) as lijnnr, isnull(fase,'') as fase , isnull(factuurbedrag,0) as factuurbedrag,
              (select sum(isnull(factuurbedrag,0)) from #tempDS_HistProjektUserVeldenViewBetalingen where lijnnr <= t1.lijnnr) as lijntotaal,
              (select sum(isnull(factuurbedrag,0)) from #tempDS_HistProjektUserVeldenViewBetalingen where lijnnr <= t1.lijnNr and billperiod_type = '110-01' ) as lijntotaalKetting
         FROM #tempDS_HistProjektUserVeldenViewBetalingen t1
         WHERE fase,'') is not null
         ORDER BY t1.fase
         DROP TABLE #tempDS_HistProjektUserVeldenViewBetalingen
    END
    GO
    Somebody has a clue what i'm doing wrong ?
    thnx

    Thanks Gordon for your reply.
    i've changed my sp to :
    USE [def1]
    GO
    /****** Object:  StoredProcedure [dbo].[spu_DS_HistProjektUserVeldenViewBetalingen]    Script Date: 10/05/2011 18:56:34 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    -- Batch submitted through debugger: SQLQuery2.sql|8|0|C:\Users\kvanhauwaert\AppData\Local\Temp\~vs2A98.sql
    CREATE PROCEDURE [dbo].[spu_DS_HistProjektUserVeldenViewBetalingen]
              /* @project_number varchar(20),
              @billperiod_type varchar(10) */
    AS
    BEGIN
         SELECT isnull(lijnnr,0) as lijnnr, isnull(fase,'') as fase, isnull(factuurbedrag,0) as factuurbedrag,
         isnull(billperiod_type,'') as billperiod_type
         INTO #tempDS_HistProjektUserVeldenViewBetalingen
         FROM DS_HistProjektUserVeldenViewBetalingen t1
         WHERE isnull(project_number,'') = '08053A'
         SELECT  isnull(lijnnr,0) as lijnnr, isnull(fase,'') as fase , isnull(factuurbedrag,0) as factuurbedrag,
              (select sum(isnull(factuurbedrag,0)) from #tempDS_HistProjektUserVeldenViewBetalingen where isnull(lijnnr,0) <= isnull(t1.lijnnr,0)) as lijntotaal,
              (select sum(isnull(factuurbedrag,0)) from #tempDS_HistProjektUserVeldenViewBetalingen where isnull(lijnnr,0) <= isnull(t1.lijnNr,0) and isnull(billperiod_type,'') = '110-01' ) as lijntotaalKetting
         FROM #tempDS_HistProjektUserVeldenViewBetalingen t1
         WHERE isnull(fase,'') <> ''
         ORDER BY t1.fase
         DROP TABLE #tempDS_HistProjektUserVeldenViewBetalingen
    END
    GO
    but that didn't solved my problem.  Any other idea's ?
    kind regards.
    Kurt

  • Error while deploying a Java Stored Procedure using JDeveloper

    Hi,
    I was going thru the Oracle By Example article: "Developing SQL and PL/SQL with JDeveloper". (http://www.oracle.com/technology/obe/obe9051jdev/ide1012/plsqlobe/obeplsql.htm)
    One of the items in this article is - "Creating and Deploying a Java Stored Procedure"
    I was able to create a java class, compile it. Created a deployment profile. created a pl/sql wrapper. While trying to deploy the java stored procedure, I am getting the following error:
    Invoking loadjava on connection 'hr_conn' with arguments:
    -order -resolve -thin
    errors : class package1/mypackage/JavaStoredProc
    ORA-29521: referenced name java/lang/StringBuilder could not be found
    The following operations failed
    class package1/mypackage/JavaStoredProc: resolution
    oracle.aurora.server.tools.loadjava.ToolsException: Failures occurred during processing
         at oracle.aurora.server.tools.loadjava.LoadJava.process(LoadJava.java:863)
         at oracle.jdeveloper.deploy.tools.OracleLoadjava.deploy(OracleLoadjava.java:116)
         at oracle.jdeveloper.deploy.tools.OracleLoadjava.deploy(OracleLoadjava.java:46)
         at oracle.jdevimpl.deploy.OracleDeployer.deploy(OracleDeployer.java:97)
         at oracle.jdevimpl.deploy.StoredProcHandler.doDeploy(StoredProcHandler.java:474)
         at oracle.jdevimpl.deploy.StoredProcHandler.doDeploy(StoredProcHandler.java:361)
         at oracle.jdevimpl.deploy.StoredProcHandler.doDeploy(StoredProcHandler.java:285)
         at oracle.jdevimpl.deploy.StoredProcProfileDt$Action$1.run(StoredProcProfileDt.java:383)
    #### Deployment incomplete. #### Oct 27, 2005 1:38:56 PM
    Appreciate your help on this..

    I am using Jdeveloper 10.1.3 Early Access Version. JDK comes with it. I also have another JDK on my machine (JDK1.4.2_09)

  • Error while executing a stored procedure from forms6i

    When I execute a STORED PROCEDURE from ORACLE DB 10g this procedure works perfectly fine.
    But when I execute the same from the FORMs 6i I get the following error:
    PDE-PLU022 Don't have access to the stored program unit
    XMLPARSERCOVER in schema CARE.
    where XMLPARSERCOVER is the class and
    CARE is the schema.
    Regards,
    Jignesh S

    I have tried this with both the owner of the schema and the intended user, -from both forms and directly.
    All rights was granted on the stored procedure. Since posting I have found that one of the tables that the procedure might insert into, was not explicitly granted to the intended user, and after rectifying that the error message went away.
    -however, the procedure now silently "finishes" without any evidence that it ever ran, if invoked from the forms application. When invoked from SQL Plus (or JDev, or Toad) it runs as expected.
    I have no public synonym for the procedure, -is that necessary?
    The stored procedure in question is implemented in java, and published as a stored procedure. It does rather heavy lifting, when running, using a view against another server , updating local tables and quite a lot of data validation/cleansing, and logging. All recourses are within the same schema.
    Any ideas?

  • Error while calling a stored procedure using SQLJ

    I am calling a stored procedure defined inside a package through a SQLJ script. The first parameter of that procedure is a IN OUT parameter which is used as a ROWID for creating a cursor. That ROWID value is the same for every record in the table, thereby enabling us to create a cursor.
    When I give a hard-coded value as a parameter, I get an error stating that the assignment is not correct as the query is expecting a variable and not a literal. Hence I removed the hard-coded value and included a dymanic value in the SQLJ call.
    String strVal = "A";
    #sql{CALL ASSIGNMENTS_PKG.INSERT_ROW :{strVal},'SALARY_CODE_GROUP','BU',3,105,sysdate,1,sysdate,1,1)};
    Here "ASSIGNMENTS_PKG" is a package name and INSERT_ROW is the procedure.
    When the SQLJ program is run, I get an error stating:
    "PLS-00201: identifier 'A' must be declared"
    I read the error message, but I am not able to understand where I need to give the GRANT permission to.

    If you're using Oracle Provider for OLE DB (OraOLEDB) to execute this stored procedure, you need to set PLSQLRSet attribute. This attribute can be set in registry, connection string, or command object. Please refer to User Documentation for more information.

Maybe you are looking for

  • Redução de base para calculo de INSS

    Caros, Boa tarde! Atualmente existe o IVA Standard "IN" que retém 15% de INSS sobre o valor total da nota diretamente no doc.contábil. Temos a necessidade de configurar um novo IVA no qual retenha 15% de INSS sobre 20% do valor total da nota. Como po

  • Sharing pictures from i photo library via e mail

    Hi, I have troubles sharing photos in my 'i photo' library via e mail. In the past I was able to send e mails with the pictures I selected but suddenly - without making any change  - I am no longer able to send messages. Internet is working fine and

  • How to open XML file in Netscape

    How to open XML file in Netscape..... XML file is opening correctly in IE, but giving error in Netscape.Error is Error loading stylesheet: Parsing and XSLT stylesheet failed.... Reply me soon..............

  • Configuring weblogic server to start automatically

    Hi, I have installed oracle weblogic server 11g, jdk/jre 7 and forms & reports 11g. i have successfully installed all softwares. I configured forms and reports domain and weblogic domain. I would like to have weblogic start automatically when i login

  • Parameter input in Oracle Workflow

    Goodmorning all, I have a mapping that requires input - using the 'mapping input parameter' operator. I would like to run this mapping using Oracle Workflow. How can I define an input parameter in Oracle Workflow? Thanks in advance for your reactions