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
 

 

SQL to Retrive the records which one haven null values

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

New User


Joined: 16 Apr 2006
Posts: 29

PostPosted: Tue Jun 20, 2006 11:01 pm    Post subject: SQL to Retrive the records which one haven null values
Reply with quote

Hi any one gives query to the below one

I want to retrive the records which one haven null values...i dont know in which colomun i haven null value...so i want to check all the columns....is it possible without specifying the all coloumns in where clause...pls reply to me
Back to top
View user's profile Send private message

DavidatK

Active Member


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

PostPosted: Wed Jun 21, 2006 2:29 am    Post subject: Re: Interview Question query
Reply with quote

I think what you want to do is not possible.

You are going to have to list each column. (Cut the column list from the DCLGNLIB).

If you find another way, please come back and post it for the rest of us.

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

New User


Joined: 10 May 2006
Posts: 64
Location: Singapore

PostPosted: Thu Jun 22, 2006 5:05 am    Post subject:
Reply with quote

To Mininmize the list of column names in your query, you can first query SYSIBM.SYSCOLUMNS as

select name from SYSIBM.SYSCOLUMNS

where TBNAME ='your table name'
AND NULLS = 'Y';


this would give you the list of nullable columns

and then in your second query you can check for IS NULL.

Anamika
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 Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am


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