Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: trailing spaces on a varchar2 select
afryer_at_my-deja.com wrote:
>
> I'm using embedded SQL to select a varchar2 datatype from a table. We
> are using Oracle7.3.4. The problem is that Oracle seems to append
> spaces up to the size that the varchar2 datatype is defined as for the
> table. Is there some way I can stop Oracle appending spaces onto the
> returned value?
>
> Thanks,
>
> Anthony
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
What tool are you using to select...
On any oracle version I've worked with, varchar2 is exactly that, variable length - no spaces appended anywhere...
try
select col, length(col), length(rtrim(col)) from table
to see if the space are actually on the table rows...
HTH
--
"Some days you're the pigeon, and some days you're the statue." Received on Wed Nov 17 1999 - 03:46:43 CST