Hmmm, well try this, bind_param it to a char type, then it might keep the
spaces.  One thing to note though, if you try to go into SQL Plus and insert
a value into a varchar field with trailing spaces, they also will not be
preserved, so again it's a data type issue.  But I believe you can bind it
to char and it will keep them.  

Ilya


-----Original Message-----
From: Jeff Hunter
To: Sterin, Ilya
Cc: '[EMAIL PROTECTED] '
Sent: 2/28/02 10:06 AM
Subject: Re: Whitespace being truncated with Oracle

I failed to mention that this worked with Perl 5.5.2 and an earlier 
version of the DBI/DBD.


Sterin, Ilya wrote:

>No, this is not a bug.  varchar automatically strips trailing spaces,
so
>it's an Oracle thing.  I would recommend familiarizing yourself with
the
>ORacle data types.  Char is probably what you want to use.
>
>Ilya
>
>-----Original Message-----
>From: Jeff Hunter
>To: [EMAIL PROTECTED]
>Sent: 2/28/02 9:40 AM
>Subject: Whitespace being truncated with Oracle
>
>
>I am using perl 5.6.1 on Solaris 2.8.  My DBI version is DBI-1.21 and
my
>
>DBD version is DBD-Oracle-1.12.  My Oracle version is 8.1.7.2 and my 
>Oracle OCI version is 8.1.7.0.0.
>
>I have setup a query that retrieves VARCHAR2(10) values from a table 
>into a bound variable.  The values in the table are right padded with 
>spaces.  When I retrieve the values, I can print them out exactly as 
>they are in the table.  However, when I insert them into another table,

>the spaces at the end of the variable are stripped off.  I think the 
>spaces are being truncated in the bind_param method.  Is this a bug
with
>
>the DBD I am using?
>
>

Reply via email to