but this query retun one record which is null at visible point of view. when I check its length it showing 17(after using ltrim & rtrim also).So i check ascii value for one substring & it is 0. So kindly let me know how to omit this record from my selection in sql 2005. Thanks in advance Deba
select col1 from test where col1 is not null and len(ltrim(rtrim(col1)))>0 and ltrim(rtrim(col1))!=''