I'm confused with the sybase built-in function len(),char_length,character_length,and datalength. For a NULL value,they return NULL,reasonable;for a string composed of one char,they return 1,reasonable again;but for an empty string,that's '',they also return 1,unbelievable!
As with Microsoft SQL Server,everything goes well,len() return 0 for an empty string.
I thought it might have something to do with ANSINULL,but whatever I set ANSINULL,ON or OFF,the results remain the same.
Any suggestion is appreciated.Tons of thanks in advance.
I think in sybase empty string '' is same as ' ' i.e. string with one space character.
Thank you! I got it.
Then,a further question,how do we differ a meaningless string,such as NULL,empty string and space,from a string composed of one char(non-space)? Is there a simple function? Thanks.