Home » SQL & PL/SQL » SQL & PL/SQL » Re: Carriage Return in Oracle?
Re: Carriage Return in Oracle? [message #8304] Thu, 07 August 2003 14:47 Go to next message
Shaad
Messages: 8
Registered: July 2003
Junior Member
Thanks for the reply Denni.

Thats a work around, altough it does not allow you to skip a line. I'd be very surprised if Oracle does not have a function that alows you to skipt lines in between dbms_output.put_line statements.

Just like CHR(10) or n

If you find something, please update me.

Thanks once again.
Shaad
Re: Carriage Return in Oracle? [message #8305 is a reply to message #8304] Thu, 07 August 2003 15:11 Go to previous messageGo to next message
denni
Messages: 24
Registered: August 2002
Junior Member
found this somewhere on the net....
you need to force "newline" using a tab or chr()
======================================================

Write both to file and to dbms_output.
procedure write(f utl_file.file_type, line varchar2) is
begin
-- dbms_output.put_line outputs an extra newline if the line contains
-- any tab chars. Why?
-- Strip out the tabs. This makes manual indentation necessary,
-- but that's easier than removing extra lines, right?
dbms_output.put_line(replace(substr(line, 1, 250), chr(9)));
if utl_file.is_open(f) then
utl_file.put_line(f, line);
end if;
end;
Re: Carriage Return in Oracle? [message #8307 is a reply to message #8305] Thu, 07 August 2003 15:54 Go to previous message
Shaad
Messages: 8
Registered: July 2003
Junior Member
Thanks a lot Denni. Can you help me out on how I must execute the procedure you created. What parameters I must pass to procedure "write".

Thanks.
Shaad
Previous Topic: Call stored procedure from sqlplus
Next Topic: Passing array from Stored Procedure to VB
Goto Forum:
  


Current Time: Thu Apr 25 12:14:31 CDT 2024