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
 

 

default null vs not null

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: default null vs not null
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

Senior Member


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

PostPosted: Mon Jul 16, 2012 3:31 pm    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    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 DFSORT - Overriding default option TU... Steve Ironmonger DFSORT/ICETOOL 3 Tue Apr 04, 2017 3:54 pm
No new posts VALIDATE NULL VALUE IN DB2 CASE STATE... useit DB2 5 Thu Feb 09, 2017 4:34 pm
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


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