locked
square symbol in oracle database RRS feed

  • Question

  • User161781117 posted

    I have textbox in my app and when i enter a space and save the data a square symbol in my oracle database appears. How do i retrieve the space and line breaks  back when i display the data  ?? How to achieve this functionality since textbox doesnt maintain space when retrieving data

    Wednesday, June 20, 2012 10:59 AM

Answers

  • User1771049139 posted

    Hi!

    You can use use the REPLACE function:

    SELECT REPLACE(text,CHR(32),otherChar) FROM table;

    Regards.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, June 26, 2012 12:00 PM
  • User-287491473 posted

    The square is shown when it doesn't know the proper symbol to display (carriage return and line feed are great examples of this).  Even though it does not know how to display it, in the DB the data is still saved correctly.  If you select it back out with a query and display it in your application, it should still display properly.

    As for the blank space dissappearing.  That's all part of the magic of Oracle :)  Check out the link below for some workaround suggestions.

    https://forums.oracle.com/forums/thread.jspa?threadID=1133171&tstart=2&messageID=4594948

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, June 28, 2012 4:51 PM

All replies

  • User1771049139 posted

    Hi!

    You can use use the REPLACE function:

    SELECT REPLACE(text,CHR(32),otherChar) FROM table;

    Regards.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, June 26, 2012 12:00 PM
  • User-287491473 posted

    The square is shown when it doesn't know the proper symbol to display (carriage return and line feed are great examples of this).  Even though it does not know how to display it, in the DB the data is still saved correctly.  If you select it back out with a query and display it in your application, it should still display properly.

    As for the blank space dissappearing.  That's all part of the magic of Oracle :)  Check out the link below for some workaround suggestions.

    https://forums.oracle.com/forums/thread.jspa?threadID=1133171&tstart=2&messageID=4594948

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, June 28, 2012 4:51 PM