Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
to get column names which has null value from table

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

New User


Joined: 31 Jul 2006
Posts: 1

PostPosted: Mon Jul 31, 2006 5:48 pm    Post subject: to get column names which has null value from table
Reply with quote

hi,
Pls help me to ,write a query to select the column name which has null value from a table
regards
Back to top
View user's profile Send private message

khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 680
Location: NJ

PostPosted: Mon Jul 31, 2006 10:25 pm    Post subject: DB2 Query
Reply with quote

Skam,

Hope the below query will work

Quote:
select * from tab1 where col1=null
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Tue Aug 01, 2006 1:38 am    Post subject: Re: to get column names which has null value from table
Reply with quote

Can you explain your requirement in more detail for us? Do you want to select the row data where a specific column name is null, or do you want to select the 'column_name' for any column that is null in a row, or select the column_name for any column that is null in the table, or do you want to select column_names for columns that could be null?

Please come back

Dave
Back to top
View user's profile Send private message
chiranjeevi_mca

New User


Joined: 19 Feb 2006
Posts: 27

PostPosted: Tue Aug 01, 2006 5:42 pm    Post subject:
Reply with quote

Select * from table where COL1 IS NULL;


the above query will retrieve the rows for col1 is null
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 Change NULL indicator in UNLOAD utility Khadhar Basha DB2 2 Fri Dec 15, 2017 3:01 pm
No new posts Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us