Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Return from function forces CR/LF ???

Return from function forces CR/LF ???

From: Bill Rowland <billrow_at_onemain.com>
Date: Fri, 28 Feb 2003 09:50:08 -0800
Message-ID: <fjN7a.674$wv7.384@news.cpqcorp.net>


Our local SQL expert wrote a function to return a Y/N flag. He uses it to set a value and
update records, which works fine. I am trying to call the function from SQL*PLUS to
output the returned flag value to a file. The returned value seems to force a CR/LF and
generate a new record, rather than just being included in the current record with the
defined field separator. (I am also do other SETs from an include file which specify
page length, record length, etc., so it isn't a problem with wrapping because of
record length.)

Example:

SET COLSEP '|';
select product_number, part_number,

           (spi.is_orderable(part_number)) as order_flag from structure;

The result is like:

33440A|33440-69001
Y

33440A|33440-69003
N

rather than the following, which is what I want:

33440A|33440-69001|Y
33440A|33440-69003|N

Of course, the SQL expert is on vacation, leaving me to figure this out. I'm not including all of the function code here, but it just returns a varchar2 (1)
field with either 'Y' or 'N'.

Any ideas how I can suppress the CR/LF in the output???

Thanks,

Bill Rowland Received on Fri Feb 28 2003 - 11:50:08 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US