-
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
-
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
-
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|