i have this code in where clause RTRIM(LTRIM(ODER_ID))= ' ',WHAT THis do
It's just removing extra blank spaces, but this is un-necessary as SQL views empty strings as empty strings regardless how many spaces there are.
So if your query is trying to return only empty strings, then you dont need to trim.
The code below highlights this, if SQL considered
'' != ' '
the above to be true, then the penultimate select query would only return 1 row, but it returns 2.
CREATE TABLE trimTest (
INSERT INTO trimTest
WHERE value = ''
WHERE LTRIM(RTRIM(value)) = ''