This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have a stored Function CREATE OR REPLACE PACKAGE BODY employeeInfo IS FUNCTION GET_EMPLOYEES return ref_cursor IS user_cursor ref_cursor; BEGIN OPEN user_cursor FOR select emp.name, wsk.skill, wsk.ability, wsk.rate,lc.city from EMPLOYEE emp, WORKERSKILL wsk, LOCATION lc where wsk.workerskillID = emp.workerskillID and emp.locationID = lc.locationID order by lc.city; RETURN user_cursor; END; END; / Which I can run using the Oracle SQL*plus editor. The problem is when I try to run it from a java application I get the following error: ORA-00900: invalid SQL statement My java code is as follows: String query = "begin ? := employeeInfo.GET_EMPLOYEES(); end;"; //String query = "begin ? := GET_EMPLOYEES(); end;";