| Posted by Paul on 02/06/07 18:25 
Thanks Plamen, I am just about to go home for the evening so I willcheck this out tommorrow.
 
 I just wanted to post an update before I go home though.
 
 I have been looking a bit more in to this and I have found that the
 following seems even stranger to me.
 
 If I have a column DESCRIPTION  VARCHAR(250) and the value is empty
 i.e. NULL then
 shouldn't doing a:
 
 SELECT TAB1.DESCRIPTION
 FROM TABLE1 TAB1
 WHERE TAB1.DESCRIPTION IS NOT NULL
 AND DATALENGTH(TAB1.DESCRIPTION) = 0
 
 always return zero records?
 A VARCHAR is variable length based on the actual data stored in it, so
 shouldn't a VARCHAR column of zero DATALENGTH be NULL?
 
 If anybody can explain this then please do!
 
 I will be looking in to Plamens suggestion tommorrow but in the
 meantime if anybody has any other ideas it will be appreciated!
 
 Thanks,
 
 Paul
  Navigation: [Reply to this message] |