This will not work in SQL Developer 20 using 'Run as script' (F5) (or in a PL/SQL Developer Command window, for that matter). If it has to work from SQL Developer, you are out of luck.
It will work in SQL*Plus and SQLcl if you clean up the syntax and place the call on its own line.
test_insert.sql
insert into table_a
( id
, version )
@@select.sql
/
select.sql
select rownum, 1
from xmltable('1 to 10')
(note that you have to decide which script contains the terminating ; or /.)
SQL*Plus: Release 19.0.0.0.0 - Production on Wed Sep 9 11:27:40 2020
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Last Successful login time: Wed Sep 09 2020 11:26:30 +01:00
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SQL> @test_insert
10 rows created.
SQL>
SQL> l
1 insert into table_a
2 ( id
3 , version )
4 select rownum, 1
5* from xmltable('1 to 10')
@select.sqlin a line on its own and fix the INSERT syntax (eitherinsert...selectorinsert...values, not both). Is that sufficient? It doesn't work in SQL Developer using F5 ('Run as script').