IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

how to retrieve empty rows?


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kannag

New User


Joined: 02 Aug 2006
Posts: 23
Location: chennai

PostPosted: Fri Sep 01, 2006 11:06 am
Reply with quote

hi all,

Suppose i have an customer table having fields like customer-id,customername,customer-address,customer-telephone.
I want to find out which customer telephone number is empty?.then i want to upgrade that field.and i want to update the customers current adress too?
anyone can give query to find out the empty rows?
Back to top
View user's profile Send private message
sri_mf

Active User


Joined: 31 Aug 2006
Posts: 218
Location: India

PostPosted: Fri Sep 01, 2006 11:15 am
Reply with quote

kannag wrote:
hi all,

Suppose i have an customer table having fields like customer-id,customername,customer-address,customer-telephone.
I want to find out which customer telephone number is empty?.then i want to upgrade that field.and i want to update the customers current adress too?
anyone can give query to find out the empty rows?


HI kanna wat do u mean by empty?is it null if so here is the query.


select * from customer where customer-telephone = NULL

u select the fields according ur requirements.here i have selected all.
Back to top
View user's profile Send private message
kannag

New User


Joined: 02 Aug 2006
Posts: 23
Location: chennai

PostPosted: Fri Sep 01, 2006 11:28 am
Reply with quote

hi all,
Suppose i have an customer table having fields like customer-id,customername,customer-address,customer-telephone.
I want to find out which customer telephone number is empty?.then i want to upgrade that field.and i want to update the customers current adress too?
anyone can give query to find out the empty rows?
and also i want cobol coding for above requirement
Back to top
View user's profile Send private message
sri_mf

Active User


Joined: 31 Aug 2006
Posts: 218
Location: India

PostPosted: Fri Sep 01, 2006 12:38 pm
Reply with quote

kannag wrote:
hi all,
Suppose i have an customer table having fields like customer-id,customername,customer-address,customer-telephone.
I want to find out which customer telephone number is empty?.then i want to upgrade that field.and i want to update the customers current adress too?
anyone can give query to find out the empty rows?
and also i want cobol coding for above requirement



here is the cobol code

exec sql
query
end-exec.

EVALUATE SQLCODE
when sql-code-ok
do the chnages u require
when sql-code-not-found
display relevant message
when other
abend the program.
end-evaluate.

kanna in each when i have given explanation there u have to check ur sqlcode.let me know if u have any more issues.

correct me if i m wrong
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts To get the count of rows for every 1 ... DB2 3
No new posts Exclude rows with > than x occurre... DFSORT/ICETOOL 6
No new posts Using Java/C/C++ to retrieve dataset ... Java & MQSeries 6
No new posts Convert single row multi cols to sing... DFSORT/ICETOOL 6
No new posts Insert trailer for non empty file only DFSORT/ICETOOL 6
Search our Forums:

Back to Top