473,385 Members | 1,317 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

CLP option not working as expected?

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

Feb 16 '06 #1
4 2540
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
Feb 16 '06 #2
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.

Feb 16 '06 #3
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
Feb 17 '06 #4
To supress warnings you need +w option

Klemens

"Eugene F" <ro********@yahoo.com> schrieb im Newsbeitrag
news:11**********************@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.

Feb 17 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: biro man | last post by:
I have a dynamic database driven page that I have been working on and tweaking etc until I have got it to work pretty much the way I want it to. I also have a defined website. I wish to include...
5
by: andy.herrera | last post by:
I'm getting this Error Message. Expected ';' Please Select One: <form name="form1"> <<------------ Error is here. <select name="selectTrans" onChange="If (this.value == 'checkout')...
4
by: Greg | last post by:
I'm guessing the problem I'm having has something to do with Master Pages or DetailsView because the exact same code works fine on a page without a Master Page and DetailsView controls. The...
15
by: guy | last post by:
when i first started using .net (beta 1) i came across option strict and thought hey this could be really good, and since then have always turned it on, most people here seem to agree that this is...
2
by: Advo | last post by:
Having major issues with this simple task, and I cant work out why its not doing as it should/expected. Basically, ive got a drop down box with the added bit of php: <select name="title"...
1
nmm32
by: nmm32 | last post by:
I am trying to use Ajax with JSP to populate a 2nd drop down list based on the chosen option of the first one. I am getting the error "Object Expected" on the line 13-14 of the HTML: <script...
1
by: mamackay | last post by:
Would somebody please tell me why I am getting the error message: Line: 46 Char: 1 Error: Object expected Code: 0 URL: http://waitinglist.asp Many thanks
61
by: bonneylake | last post by:
Hey Everyone, Well after asking many questions i have this almost working. This is how it works. Basically i fill in my customer number field an that populates my drop down box. Once i select...
9
whatelyb
by: whatelyb | last post by:
I am having trouble related to the attached coding. I am trying to make the object "flight1pic" change depending on what is selected in the drop down menus "airline1" and "aircraft1". My...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.