What is "data"? If you mean column, what is its data type? Can you post some sample values?
What "data" is "13 digits"? May they be separated/padded by another characters?
Maybe it would be helpful, if you read this article before posting any question: http://tkyte.blogspot.com/2005/06/ho...questions.html
Pay special attention to the "Context" paragraph. Then, please try to post relevant parts of your problem. Do not hesitate to also post DDL/DML statements - yes, we do understand Oracle SQL here.
Because, now it is impossible to deduce anything (input, applied rules, output) from your post, so it is also impossible to provide you any meaningful suggestion/solution.
yes is is length, but i canget the length by using length function, but the issue is, some of the datas having emply spaces with them, bt using length those datas are also getting displayed. i have to find the data length and also i have to omit the spaces. and can anyone tell me the exact use of trim().
SQL> with test as
2 (select 'H123' col from dual union
3 select 'A 12 45 ' from dual union
4 select 'B123456 789' from dual union
5 select 'C 1 2 3 4 ' from dual
7 select col
8 from test
9 where length(replace(col, ' ', '')) = 5;
A 12 45
C 1 2 3 4
Anyway: if you want to get the most accurate answer, you should provide as many details as possible. First there were numbers, then there were strings, now there are strings with spaces. What will be next?