Why does this fail in SQL Developer against an Oracle database and what would the an appropriate way of achieving the same?
DECLARE v_pNbr NUMBER := 100150;
begin
select * from TARGETTABLE where PROCESSNBR = v_pNbr;
end;
ORA-06550: line 3, column 2: PLS-00428: an INTO clause is expected in this SELECT statement
Coming from SQL Server I have gotten used to creating variables in SSMS query editor/page and then running them across multiple selects. Hence it allows one to understand the operations with a change to one instead of many. The examples I have seen seem to hint a historical terminal usage instead of editor which may preclude such a way of working.... Ergo what is accepted way of working with pl/sql as such.