Does Sybase support string types that it doesn't right trim? -


the accepted answer this question claims using char column preserve all filling spaces in string in sybase, not behavior seeing (unless i'm mistaken 'filling spaces' means). example, when run following script:

create table #check_strings (     value char(20) null )  insert #check_strings values (null) insert #check_strings values ('') insert #check_strings values (' ') insert #check_strings values ('     ') insert #check_strings values ('blah') insert #check_strings values ('blah ') insert #check_strings values ('blah    ') insert #check_strings values ('    blah    ')  select value, len(value) #check_strings 

i following output:

[null]            - [null] [single space]    - 1 [single space]    - 1 [single space]    - 1 blah              - 4 blah              - 4 blah              - 4 [four spaces]blah - 8 

is there way sybase not strip off trailing spaces? additionally, there way save empty string empty string, , not single space?

i'm using sybase 15.5.

see http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.ase_15.0.sqlug/html/sqlug/sqlug208.htm

"when create char, unichar, or nchar column allows nulls, adaptive server converts varchar, univarchar, or nvarchar column , uses storage rules datatypes."

please, check not null column.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -