View Single Post

   
  #2 (permalink)  
Old 02-27-2008, 06:06 AM
Serge Rielau
 
Posts: n/a
Default Re: CLP option not working as expected?

Eugene F wrote:
> 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?

Because you didn't do a FETCH? You did INSERT.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Reply With Quote