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

Home -> Community -> Usenet -> c.d.o.server -> Re: trailing spaces

Re: trailing spaces

From: Frank <fbortel_at_nescape.net>
Date: Sun, 14 Dec 2003 21:21:39 +0100
Message-ID: <brig7s$5t2$1@news1.tilbu1.nb.home.nl>


Daniel Morgan wrote:

> Frank wrote:
>

>> Ravi Tallury wrote:
>>
>>> Hi
>>> When i do a select '1' from dual from one instance of the database, i 
>>> get only a
>>> single chanrecter.
>>>
>>> However when i run the same query from an other instance, i get a
>>> blank padded string. This has been causing problems in our application
>>> because of logic we use, any help in figuring out the reason and the
>>> remedy would be quite helpful.
>>>
>>> Thanks
>>> Ravi
>>
>>
>>
>> I would really like to know the origin of this problem; it seems
>> very, very odd that a basic thing like select '1' from whatever
>> would return anything else than '1'.

>
>
> One posibility is as follows:
>
> DECLARE
>
> x CHAR(10);
>
> BEGIN
> SELECT '1' INTO x FROM dual;
> DBMS_OUTPUT.PUT_LINE(x);
> END;
> /
>
> But I agree with your thinking.
>

But that was not in the OP's message. When I do a select '1' from dual. That's all. Of course, selecting INTO a right padded object type is something different (but might be the case here)

-- 
Regards, Frank van Bortel
Received on Sun Dec 14 2003 - 14:21:39 CST

Original text of this message

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