I'm having a very strange problem occur. It is problaby due to a sqlplus setting, but I haven't been able to figure out what it is. I have a package of a bunch of user functions that requesting data from the database. Outside of the package, I am running some SQL that calls the user function and in sqlplus, this is being spooled to a file. But when I look at the file, the data being returned from the function is spooled with a CRLF both before and after the field. (I looked at the file in Hex and saw 0D0A's.
this is something close to what I'm doing:
fieldc only returns a single Character and I know that works properly, yet when looking at the spooled file, there is a 0D0A both before and after the field. Other fields are ok,only the ones returned from user functions. (I have several functions I do this for)
I have the following set in sqlplus:
set term on
set heading off
set feedback off
set verify off
set pagesize 0
set echo off
set serveroutput off
set trimout on
set trimspool on
set linesize 1000
the PL/SQL functions are defined to return CHAR, but I have also tried with VARCHAR and VARHCAR2, just trying anything. In the sql, I also did a select of the length(funcreturnvalue) and it shows the correct length.