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 value in a NOT NULL column

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

New User


Joined: 17 Jan 2008
Posts: 25
Location: Chennai

PostPosted: Wed Feb 18, 2009 1:02 am    Post subject: NULL value in a NOT NULL column
Reply with quote

Hi,

SELECT * FROM TRX
WHERE TRX.NAME = 'KR'
AND LOCK_A IS NOT NULL
WITH UR;

LOCK_A is a CHAR(1) field. Above query gives me a record which when i put HEX ON displays a value '00'.

I understand '00' is a null value. Please advise.

Thanks,
Soundar
Back to top
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Wed Feb 18, 2009 1:11 am    Post subject:
Reply with quote

Quote:
I understand '00' is a null value.
True enough, but in the world of DBAs, their "null" means more like "does not exist", not that the column contain null values. X'00' is data, just like alpha or numeric data......
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Feb 18, 2009 1:35 am    Post subject:
Reply with quote

Hello,

Quote:
I understand '00' is a null value. Please advise.
A common mis-understanding. . .

x'00' is also known as low-values, hex zeros, and binary zeros. All of which are values. NULL is the absence of any value. The condition may be tested (i.e. IS NULL), but there can be no compare for some value that 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 DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts SQZ pipe delimited file with 1 column... Rick Silvers DFSORT/ICETOOL 2 Sun Nov 06, 2016 8:11 pm
This topic is locked: you cannot edit posts or make replies. Checking wether a string starts from ... sundaram.naveen CLIST & REXX 9 Thu Oct 06, 2016 11:56 am
No new posts Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am
No new posts Add system date inside of a PS file a... pramitdas DFSORT/ICETOOL 5 Sun Aug 28, 2016 12:06 am


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