Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

how to retrieve empty rows?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: how to retrieve empty rows?
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: 216
Location: India

PostPosted: Fri Sep 01, 2006 11:15 am    Post subject: Re: how to retrieve empty rows?
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    Post subject: need cobol coding to find empty nullable values
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: 216
Location: India

PostPosted: Fri Sep 01, 2006 12:38 pm    Post subject: Re: need cobol coding to find empty nullable values
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm
This topic is locked: you cannot edit posts or make replies. DB2 query Using Recursion, Converting... smilewithashu2 DB2 3 Tue Jan 03, 2017 12:50 pm
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm
No new posts Row-Numbers of distinct rows? Auryn DB2 1 Thu Oct 20, 2016 4:38 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us