Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / February 2006

Tip: Looking for answers? Try searching our database.

CLP option not working as expected?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Eugene F - 16 Feb 2006 16:34 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
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.