Описание ошибки:
SEVERE: ORA-06550: line 1, column 7:
PLS-00103: Encountered the symbol "=" when expecting one of the following:
( begin case declare exit for goto if loop mod null pragma
raise return select update while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
continue close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge pipe purge
The symbol "<an identifier>" was substituted for "=" to continue.
Java-код:
private String get_Supply_sector_emailid(int poNum) {
String retString = null;
try {
ConnectionManager cm = ConnectionManager.getInstance();
connection = cm.getConnection();
// Are there any email ids registered in the contacts for the selected vendor
String sql = "{ call := PS_DISA_POTXMN. get_supply_sector_emailId(?,?) }";
poCallableStatement = connection.prepareCall(sql);
// register the type of the out parameter - an Oracle specific type
poCallableStatement.setInt(1, poNum);
poCallableStatement.registerOutParameter(2, Types.VARCHAR);
// execute and retrieve the result set
poCallableStatement.execute();
retString = poCallableStatement.getString(2);
}
catch (Exception ex) {
JDBCHelper.rollback(connection);
log.error(ex.getMessage(), ex);
throw new SystemException(ex.getMessage(), ex);
}
return retString;
}
Процедура Oracle:
procedure get_supply_sector_emailId(p_PONUMBER IN number, p_emailId OUT varchar2) is
begin
select tparcomm
into p_emailId
from tra_parpostes, LIENSECAPPRO, SECAPPRO, CDEENTCDE
where tpartabl = 9612
and ecdcincde = p_PONUMBER
and tparpost = SAPCEXAP
and liacfin = ecdcfin
AND liaccin = ecdccin
AND liacinap = sapcinap
AND LIASITE=ECDSITE
and langue = 'US'
AND tparcmag = 0
and tparcomm is not null;
exception
when others then
dbms_output.put_line('Excep:' || sqlerrm);
end;
Поскольку я новичок в области взаимодействия с ORACLE db из Java, любая помощь приветствуется.