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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: how do I concatenate a string in PL/SQL?

Re: how do I concatenate a string in PL/SQL?

From: David Sharples <davidsharples_at_gmail.com>
Date: Wed, 8 Feb 2006 22:59:09 +0000
Message-ID: <be592d550602081459p679964b0nb30d66e0d42e5d69@mail.gmail.com>


you are blowing the size of the variable - use varchar2 instead as your string is being padded with spaces

On 2/8/06, Roger Xu <roger_xu_at_dp7uptx.com> wrote:
>
> SQL> !cat /tmp/abc.sql
> set serveroutput on
> set verify off
>
> declare
>
> a_strng CHAR(50);
> a_ATWRT CHAR(30);
>
> begin
>
> a_ATWRT := 'World';
> a_strng := 'Hello';
> a_strng := a_ATWRT || a_strng;
> dbms_output.put_line ( a_strng);
>
> end;
>
> /

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Feb 08 2006 - 16:59:09 CST

Original text of this message

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