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
 

 

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 Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 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
No new posts Join of more than one table dibyendumandal11111 DB2 6 Mon Feb 13, 2017 11:36 pm


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