Hi All -
Can anyone tell me what I'm doing wrong here. Appreciate any help. Thanks
In DB
CREATE OR REPLACE FUNCTION sf_Sales (
Date VARCHAR2,
Company_ID VARCHAR2
) RETURN NUMBER IS
:
:
:
In Java Code
sqlStr = "SELECT sf_Sales(" + sqlParam + ") SalesAmt from dual";
Class.forName("oracle.jdbc.driver.OracleDriver");
connection = DriverManager.getConnection("jdbcracle:thin<IP>:<Port>:<sid>","Admin","Password");
Statement statement = connection.createStatement();
selcurs = statement.executeQuery(sqlStr);
selcurs.next()
System.out.println(selcurs.getFloat("SalesAmt")); <-- Getting invalid column name error.
Can anyone tell me what I'm doing wrong here. Appreciate any help. Thanks
In DB
CREATE OR REPLACE FUNCTION sf_Sales (
Date VARCHAR2,
Company_ID VARCHAR2
) RETURN NUMBER IS
:
:
:
In Java Code
sqlStr = "SELECT sf_Sales(" + sqlParam + ") SalesAmt from dual";
Class.forName("oracle.jdbc.driver.OracleDriver");
connection = DriverManager.getConnection("jdbcracle:thin<IP>:<Port>:<sid>","Admin","Password");
Statement statement = connection.createStatement();
selcurs = statement.executeQuery(sqlStr);
selcurs.next()
System.out.println(selcurs.getFloat("SalesAmt")); <-- Getting invalid column name error.