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 remove colums having null values

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
deesun

New User


Joined: 29 Aug 2006
Posts: 15

PostPosted: Mon Sep 03, 2007 12:02 pm    Post subject: How to remove colums having null values
Reply with quote

Can anyone please let me know how to remove teh columns with null values
Back to top
View user's profile Send private message

guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Mon Sep 03, 2007 12:21 pm    Post subject:
Reply with quote

Hi There,

I have not understood ur query clearly but i think u want to get all the rows where coloum1 is not null
Query

Code:
SELECT *
FROM table1
WHERE col1 IS NOT NULL;


Please let us know if you want any thing other than this?
Back to top
View user's profile Send private message
deesun

New User


Joined: 29 Aug 2006
Posts: 15

PostPosted: Mon Sep 03, 2007 12:29 pm    Post subject:
Reply with quote

I have got what i wanted Thanks actually I wanted to do something like below remove the null values

EXEC SQL
UPDATE EMPLOYEE
SET PHONENO='NONUM' WHERE PHONENO IS NULL;
END;
EXEC SQL CLOSE UPCUR;
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 Sorting of hex values Saurabh_mi DFSORT/ICETOOL 11 Thu May 25, 2017 3:49 pm
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm
No new posts Compare two files and subtract values ameetmund DFSORT/ICETOOL 7 Fri Mar 31, 2017 3:35 pm


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