[quote=Benny]
[...] the problem I was having where plsql developer would not AutoSelect if my script/sql file contained an anonymous block elsewhere in the same script.
For example, if my script contained this:
BEGIN
dbms_output.put_line('testing anonymous block with auto_select feature in plsql developer');
END;
SELECT 'Hello from dual' FROM dual;
SELECT 'Bye from dual' FROM dual;
Then, even with AutoSelect enabled, it would fail if my cursor is on either of the two select statements in the script.
[/quote]
Your original problem might have come from the fact that your script was actually incorrect - it did not contain correct separators.
As with Oracle SQL*Plus (with default settings), the PL/SQL Developer uses semicolon (";") to indicate end of a SQL query/command, but as the semicolon is used within PL/SQL blocks, to separate instructions, it can't be used to indicate end of a whole PL/SQL blocks, so for those, the backslash character is used ("/").
You do not have the backslash character at the end of your (anonymous) PL/SQL block, so the PL/SQL does not know that it ends just after "END;", so assumes that the next 2 select statements are part of it. Just as Oracle's SQL*Plus would.
The corrected code would look like this:
BEGIN
dbms_output.put_line('testing anonymous block with auto_select feature in plsql developer');
END;
/
SELECT 'Hello from dual' FROM dual;
SELECT 'Bye from dual' FROM dual;