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: Roger Xu <roger_xu_at_dp7uptx.com>
Date: Wed, 8 Feb 2006 17:21:03 -0600
Message-ID: <A6801E8A03316A4DA597866F77A013F7095E6867@irv2kexch01.tx.bg.corp>


thanks varchar2 works like a charm

-----Original Message-----
From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org]On Behalf Of David Sharples Sent: Wednesday, February 08, 2006 4:59 PM To: Roger Xu
Cc: Pat Hildebrand; Jared Still; Oracle-L_at_Freelists. Org (E-mail) Subject: Re: how do I concatenate a string in PL/SQL?

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;

/

For technical support please email tech_support_at_dp7uptx.com or you can call (972)721-8257.
This email has been scanned for all viruses by the MessageLabs Email Security System.

This e-mail is intended solely for the person or entity to which it is addressed and may contain confidential and/or privileged information. Any review, dissemination, copying, printing or other use of this e-mail by persons or entities other than the addressee is prohibited. If you have received this e-mail in error, please contact the sender immediately and delete the material.



This email has been scanned for all viruses by the MessageLabs Email Security System. Any questions please call 972-721-8257 or email your request to tech_support_at_dp7uptx.com.
--
http://www.freelists.org/webpage/oracle-l
Received on Wed Feb 08 2006 - 17:21:03 CST

Original text of this message

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