IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

default null vs not null


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
checky76

New User


Joined: 13 Oct 2007
Posts: 10
Location: Vienna

PostPosted: Mon Jul 16, 2012 2:57 pm
Reply with quote

hi,

i have a table with some columns defined with default null (column systemcode_1)
when i select column SYSTEMCODE_1 <> '91' and the columns is null no result will be displayed.
when i select AND SYSTEMCODE_1 <> '91' or is null then result is ok.

is this normal in db2 ?

regards
christian
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Jul 16, 2012 3:31 pm
Reply with quote

What do you call as "result is ok"?
Back to top
View user's profile Send private message
checky76

New User


Joined: 13 Oct 2007
Posts: 10
Location: Vienna

PostPosted: Mon Jul 16, 2012 3:42 pm
Reply with quote

then i get the row i expect.

i mean that when i sql >< '81' null values must be included ?

regards
Christian
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Mon Jul 16, 2012 5:39 pm
Reply with quote

Code:
 SYSTEMCODE_1 is distinct from '91'
Back to top
View user's profile Send private message
checky76

New User


Joined: 13 Oct 2007
Posts: 10
Location: Vienna

PostPosted: Mon Jul 16, 2012 6:01 pm
Reply with quote

thanks for the info.

regards
christian
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Mon Jul 16, 2012 7:26 pm
Reply with quote

google a bit about "DB2 is distinct from"
This should give you some links where it is all explained.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
No new posts Running a Job with the Default User ID JCL & VSAM 2
No new posts Change Default Scroll Setting TSO/ISPF 1
No new posts the system or user abend SF0F R=NULL COBOL Programming 0
No new posts Define default volume for DSN storage... JCL & VSAM 8
Search our Forums:

Back to Top