How can I remove ASCII text from a field when I use it in a query
426931Aug 4 2004 — edited Oct 21 2004How can I remove ASCII text from a field when I use it in a query?
I am running a select statement on a table that appears to have ASCII text in some of the fields. If I use these fields in the where statement like the code below nothing returns:
SELECT FIELD1 FROM TABLE1 WHERE FIELD1 IS NULL
But the field looks empty if I do a straight select without the where clause. Additionally, one of the fields has text but appears to be padded out with ASCII text, which I need to strip out before I can use this field in a where or join statement. I have tried using a trim, ltrim, rtrim, to_char, nvl, decode and nothing works. When I use excel to run the same query it looks as if these ASCII fields are boxes.
I have asked our DBA team to see what they can do to prevent these from going into the table, but in the mean time I still need to run this report.
Do you have any suggestions?