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 Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm
No new posts setting new limit Key values for inde... srilata83 DB2 1 Fri Feb 10, 2017 9:24 pm
No new posts VALIDATE NULL VALUE IN DB2 CASE STATE... useit DB2 5 Thu Feb 09, 2017 4:34 pm


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