I have found my answer from another source.  Thanks to all who participated.

It seems that between the 1.06 and the 1.12 version of the Oracle DBD 
the default datatype of string data changed from CHAR to VARCHAR2.  As 
others have suggested, casting the bound variable indeed preserves the 
whitespace.

Jeff Hunter wrote:

> 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