All Forums Database
toadrw 69 posts Joined 07/04
01 Sep 2012
Compress text value NULL



Will this compress an actual text value of NULL (i.e. 'NULL')?  I understand it doesn't make a whole lot of sense to store NULL as text, but this isn't my data so I can't do anything with it except suggest that they change it.

I've tried creating tables with Compress('NULL' and when I do a SHOW TABLE it returns it as COMPRESS('NULL ') with an extra space so I thought that was a little strange and 'NULL' is not equal to 'NULL ' as far as text goes so I should probably tell this company to reconsider storing NULL as a text value...

Also, are NULL values (not text) automatically compressed by Teradata or do you still need to COMPRESS keyword to compress NULL values?  I think you still need COMPRESS, but I would just want to verify.  

Thank you for your help!



ulrich 816 posts Joined 09/09
02 Sep 2012

compress('NULL') will compress the String 'NULL' and any NULL as well as NULL is compressed in any case if a compress statement is given.

feel free to donate bitcoin:12kgAUHFUqvG2sQgaRBXFhCwyf9HXdkGud

You must sign in to leave a comment.