db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Norman <mwnor...@gmail.com>
Subject cannot create a function with no arguments
Date Thu, 06 Sep 2007 13:59:02 GMT

latest Derby:
  Apache Derby
  10.3.1.4 - (561794)
  Apache Derby Network Client JDBC Driver
  10.1.2.1

I have an extremely simple helper class:

  package test;

  import java.sql.SQLException;

  public class SPHelper {

      public static void ProcNoArgs() throws SQLException {
      }
    
      public static String FuncNoArgs() throws SQLException {
          return "gidday";
      }
  }

The first external procedure works:

  CREATE PROCEDURE PROC_NO_ARGS() 
  LANGUAGE JAVA 
  EXTERNAL NAME 'test.SPHelper.ProcNoArgs' 
  PARAMETER STYLE JAVA
  NO SQL

but I cannot create a no-arg function:

  CREATE FUNCTION FUNC_NO_ARGS() RETURNS VARCHAR
  LANGUAGE JAVA
  EXTERNAL NAME 'test.SPHelper.FuncNoArgs'
  PARAMETER STYLE JAVA
  NO SQL
  CALLED ON NULL INPUT

I get the following exception:

 09:43:30  [CREATE - 0 row(s), 0.000 secs]  [Error Code: -1, SQL State:
42X01]  Syntax error: Encountered "LANGUAGE" at line 2, column 3.
... 1 statement(s) executed, 0 row(s) affected, exec/fetch time: 0.000/0.000
sec [0 successful, 0 warnings, 1 errors]

Any ideas?


-- 
View this message in context: http://www.nabble.com/cannot-create-a-function-with-no-arguments-tf4392364.html#a12523237
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Mime
View raw message