with ODAC it works properly.ORA-01036 illegal variable name/number
Code: Select all
declare
compcount integer;
begin
select count(*) into compcount from competitor where name = :NAME;
if (compcount > 0) then
select id into compcount from competitor where name = :NAME;
else
INSERT INTO competitor
(ID, NAME)
VALUES
(SEQ_COMPETITOR.NEXTVAL, :NAME);
select SEQ_COMPETITOR.CURRVAL into compcount from dual;
end if;
insert into compet
(quo_id, competitor_id, offerprice)
values
(:Original_quo_id, compcount, :offerprice);
end;
I sent you an example