none
Need replace the " ENTER key" in a string by html <br> while retriving from the table in oracle sql query

    Question

  • Hi guys,

    I have a large text that can have some ENTER character inside of it which is stored in database. The problem is that when ever i'm retriving the that column from table ... the ENTER character must be replace with html "<br>" srting.

    Thank You,
    Arun

    Friday, December 28, 2012 9:21 AM

Answers

  • try this:select REPLACE(column_name, CHAR(13)+CHAR(10), '<b>')from tablename

    Regards,Eshwar.


    Please use Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful.

    • Marked as answer by ArunAsto Friday, December 28, 2012 11:04 AM
    Friday, December 28, 2012 10:09 AM

All replies

  • try this:select REPLACE(column_name, CHAR(13)+CHAR(10), '<b>')from tablename

    Regards,Eshwar.


    Please use Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful.

    • Marked as answer by ArunAsto Friday, December 28, 2012 11:04 AM
    Friday, December 28, 2012 10:09 AM
  • Hello ArunAsto,

     Please try the below steps to achieve this

      1. Create a variable say "NewLineChar" With datatype String.

      2. To the variable , Assign the value Environment.NewLine using a script task

      3. In the dataflow task , use this variable as a second parameter for the REPLACE function as below

    REPLACE(c1,@[User::newlinechar],"<br>")


    Best Regards Sorna

    Friday, December 28, 2012 10:53 AM