Frage

I'm currently using Oracle SQL Developer 4.0.1.14, doing something like this:

UPDATE mytable SET myfield = 'myvalue' WHERE myotherfield = 234;
INSERT INTO mytable (myfield , myotherfield) VALUES ('abc', 123);
INSERT INTO mytable (myfield , myotherfield) VALUES ('abd', 124);
...

... and many many more lines.

If one runs the whole script, one only sees output like this:

8 rows updated.
1 rows inserted.
1 rows inserted.
...

In a small script, this is not a problem, since you can easily see, which line caused which output. But if you think on a script with 1k lines, to find a "0 rows updated." and which command caused, it ends up in frustration.

So I would rather want an output like this:

> UPDATE mytable SET myfield = 'myvalue' WHERE myotherfield = 7393;
8 rows updated.
> INSERT INTO mytable (myfield , myotherfield) VALUES ('abc', 123);
1 rows inserted.
> INSERT INTO mytable (myfield , myotherfield) VALUES ('abd', 124);
1 rows inserted.
...

I know, this is possible in Sql*Plus when running a script in verbose mode. But this should also be possible in SQL Dev, shouldn't it?

I would highly appreciate if one could tell me how.

Thanks a lot!

War es hilfreich?

Lösung

try to use set echo on (sqlplus command which works in sql developer too), e.g.

create table t(a varchar2(100));

set echo on
update t set a = 0;
update t set a = 0;
update t set a = 0;

output is (after F5 - run script)

table T created.
> update t set a = 0
0 rows updated.
> update t set a = 0
0 rows updated.
> update t set a = 0
0 rows updated.
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top