I am trying to create a basic PL/SQL query where I am using a certain SKU as a parameter so that I can reference it without typing in the sku each time.
When compiling my code I get the error:
Error report: ORA-06550: line 6, column 1: PLS-00428: an INTO clause is expected in this SELECT statement 06550. 00000 - "line %s, column %s:\n%s" *Cause: Usually a PL/SQL compilation error. *Action:
Here is my code:
declare
myitem number (20);
begin
myitem := 1000956;
select f.order_no
from fdt_maptool f
where f.item = myitem;
end;
/
I thought that maybe it had to do with me using VARCHAR(20) instead of NUMBER, So I tried that as well.
declare
myitem number;
begin
myitem := 1000956;
select f.order_no
from fdt_maptool f
where f.item = myitem;
end;
/
And then received this error:
Error report: ORA-06550: line 6, column 1: PLS-00428: an INTO clause is expected in this SELECT statement 06550. 00000 - "line %s, column %s:\n%s" *Cause: Usually a PL/SQL compilation error. *Action:
I am fairly new to PL/SQL so if please go easy on me!
select f.order_no into v_order_no from ..., assuming that f.item is a unique column. - Boneist...where f.item = :p_itemor maybe...where f.item = &item. - Boneist