I am trying to suppress warnings from SQL in CLP using its -w option
but had no luck to make it. So I have two dummy tables t and x of the
same simple structure, and table x is empty, then I am doing as follows
from CLP (DB2 LUW client):
db2 => select * from x
I
-----------
0 record(s) selected.
db2 => list command options
...
Option Description Current Setting
------ ---------------------------------------- ---------------
...
-w Display FETCH/SELECT warning messages ON
...
db2 => insert into t select * from x
SQL0100W No row was found for FETCH, UPDATE or DELETE; or the result
of a
query is an empty table. SQLSTATE=02000
db2 => update command options using w off
DB20000I The UPDATE COMMAND OPTIONS command completed successfully.
db2 => list command options
...
Option Description Current Setting
------ ---------------------------------------- ---------------
...
-w Display FETCH/SELECT warning messages OFF
...
db2 => insert into t select * from x
SQL0100W No row was found for FETCH, UPDATE or DELETE; or the result
of a
query is an empty table. SQLSTATE=02000
Why the FETCH warning still pops up? Any idea why?
Thanks,
-Eugene
Serge Rielau - 16 Feb 2006 17:43 GMT
> I am trying to suppress warnings from SQL in CLP using its -w option
> but had no luck to make it. So I have two dummy tables t and x of the
[quoted text clipped - 38 lines]
>
> Why the FETCH warning still pops up? Any idea why?
Because you didn't do a FETCH? You did INSERT.
Cheers
Serge

Signature
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Eugene F - 16 Feb 2006 18:36 GMT
I am guessing FETCH was actually occured because it's INSERT FROM
SELECT and the resultant row set (table) was empty. Besides the
terminology or the way CLP is implemented, I believe -w should've cut
the warning in that case.
Knut Stolze - 17 Feb 2006 07:29 GMT
> I am guessing FETCH was actually occured because it's INSERT FROM
> SELECT and the resultant row set (table) was empty. Besides the
> terminology or the way CLP is implemented, I believe -w should've cut
> the warning in that case.
You do have an INSERT statement and not a SELECT or FETCH.

Signature
Knut Stolze
DB2 Information Integration Development
IBM Germany
Klemens - 17 Feb 2006 09:35 GMT
To supress warnings you need +w option
Klemens
> I am guessing FETCH was actually occured because it's INSERT FROM
> SELECT and the resultant row set (table) was empty. Besides the
> terminology or the way CLP is implemented, I believe -w should've cut
> the warning in that case.