Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

invisible Special character in all_source table text column

Pandiyan_SenthurMay 21 2014 — edited May 21 2014

Hi All,

Query:

SELECT P.TEXT,S.TEXT,P.LINE,S.LINE,LENGTH(P.TEXT),LENGTH(S.TEXT), LENGTH(REPLACE(P.TEXT,' ','')), LENGTH(REPLACE(S.TEXT,' ',''))

            FROM all_source p,all_source@LINK_TST.WORLD s

           WHERE p.TYPE = 'FUNCTION'

             AND p.owner = 'ASAP'

            AND P.OWNER=S.OWNER AND P.TYPE=S.TYPE AND P.LINE=S.LINE AND

            P.NAME=S.NAME AND

            AND LENGTH(TRIM(P.TEXT)) <> LENGTH(TRIM(S.TEXT));

Clarification:

This query returns the  mismatch line as a result.

1 line of a function is resulted  on the query, while seeing both text values are similar.

   1 used TRIM function doesnt works TRIM(text) <> TRIM (text)

    2.LENGTH(TRIM(P.TEXT)) <> LENGTH(TRIM(S.TEXT));

    3.used REPLACE function doesnt works  LENGTH(replace(P.TEXT, ' ')) <> LENGTH(replace(S.TEXT,' '));

I have verified that one function has extra invisible character in the text column which causes the query to retun incorrect value.

how to exclude the invisible character in query?

Thanks,

Senthur

This post has been answered by padders on May 21 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 18 2014
Added on May 21 2014
5 comments
2,175 views