vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |
| |||
| 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 |
| |||
| 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. |
| |||
| Eugene F wrote: > 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. -- Knut Stolze DB2 Information Integration Development IBM Germany |
| ||||
| To supress warnings you need +w option Klemens "Eugene F" <rolex777ru@yahoo.com> schrieb im Newsbeitrag news:1140114975.379265.228600@g43g2000cwa.googlegr oups.com... > 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. > |