newline in oracle composed message
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: newline in oracle composed message

  1. #1
    Join Date
    Jul 2000
    Posts
    68
    helpful person-

    I need to compose a messgage from within oracle. When I do this, I get 1 big string back (I use a varchar to return the composed message) no matter how I try to insert newlines.

    I have tried the following, all to no avail:

    VARCHAR2 myMessage(256);

    myMessage := 'asdfsad' || '\n' || 'asdfsad'
    myMessage := 'asdfdsa' || '\r\n' || 'asdfsad'
    myMessage := 'asdfsadf' || '\014' || 'asdfsa'
    myMessage := 'sadfdsa' || '<cr>' || 'asdfds'

    any ideas on how to do this? My last resort will have to be to insert a marker character in the composition & then write a client side script to replace the marker character with a newline - but this is a hack..


    thanks

  2. #2
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    declare
    mymsg varchar2(256);
    begin
    mymsg := 'this is the first line.';
    mymsg := mymsg || chr(10) || 'This is the second line';
    dbms_output.put_line(mymsg);
    end;
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  3. #3
    Join Date
    Jul 2000
    Posts
    68
    Thanks very much. It works.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width