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: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Sun, 14 Dec 2003 12:04:27 -0800
Message-ID: <1071432172.619201@yasure>


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.

-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Sun Dec 14 2003 - 14:04:27 CST

Original text of this message

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