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
 

 

Null DB2

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

New User


Joined: 19 Sep 2005
Posts: 1

PostPosted: Mon Sep 19, 2005 6:24 pm    Post subject: Null DB2
Reply with quote

Hi Freinds,

Emptab

name char(10) not null
id Char(10) not null
Sal char(10)

In this table, i want to select only those rows where sal should not be null.In this some of the rows have null values in the Sal column. I want to retrive only those rows where Sal is not equal to NULL.

for null we can have where sal is NULL, then what about vice-versa for this?

Regards,
Raags
Back to top
View user's profile Send private message

nitin4.a

New User


Joined: 16 Aug 2005
Posts: 26

PostPosted: Mon Sep 19, 2005 6:41 pm    Post subject: Re: Null DB2
Reply with quote

hi
null is like a condition for noops
so i think you can use this condition with if /else for vice versa i.e use else instead of if for sal not null
regards
sonu
Back to top
View user's profile Send private message
vikramyadav

New User


Joined: 28 May 2005
Posts: 41
Location: Gurgaon

PostPosted: Sat Oct 01, 2005 5:32 pm    Post subject: Re: Null DB2
Reply with quote

hi,
if you want to get the null value records in the salary column then just use the following query:------

select * from <table-name>
where salary 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 Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am
No new posts Converting NULL column into NOT NULL ... Raghu navaikulam DB2 5 Sat Aug 06, 2016 3:45 pm
No new posts GetObjectArrayElement returns NULL Majid Hussain Java & MQSeries 2 Wed Mar 30, 2016 2:59 am
No new posts Query to select Null row on priority RahulG31 DB2 24 Thu Jan 21, 2016 5:45 pm
No new posts Null Indicator value -2 means in Embe... deepak_shrivastava DB2 2 Wed Jan 06, 2016 10:27 pm


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