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: Shamita Singh <shamita_s_at_yahoo.com>
Date: Wed, 8 Feb 2006 16:08:21 -0800 (PST)
Message-ID: <20060209000822.99669.qmail@web50112.mail.yahoo.com>


Hi Roger,    

  What did you declare the variables: a_strng and a_atwrt?    

  Here's a description of the error you're having:    

          ORA-06502: PL/SQL: numeric or value error string Cause: An arithmetic, numeric, string, conversion, or constraint error occurred. For example, this error occurs if an attempt is made to assign the value NULL to a variable declared NOT NULL, or if an attempt is made to assign an integer larger than 99 to a variable declared NUMBER(2). Action: Change the data, how it is manipulated, or how it is declared so that values do not violate constraints.    

  Regards,
  Shamita   

Roger Xu <roger_xu_at_dp7uptx.com> wrote:

      Nothing wrong with the cursor, the only problem is: "a_strng := a_ATWRT || a_strng;"    

  ORA-06502: PL/SQL: numeric or value error ORA-06512: at line 97    

  everything else works fine if I comment out "a_strng := a_ATWRT || a_strng;"    

  Again, the question is "How do I concatenate a string?" I guess := is for numeric value only?    

  Thanks,    

  Roger
    -----Original Message-----
From: Jared Still [mailto:jkstill_at_gmail.com] Sent: Wednesday, February 08, 2006 3:17 PM To: Roger Xu
Cc: Oracle-L_at_Freelists. Org (E-mail)
Subject: Re: how do I concatenate a string in PL/SQL?

It is hard to help when we don't know what the errors are.

Try posting a working example that duplicates the error.

  On 2/8/06, Roger Xu < roger_xu_at_dp7uptx.com> wrote: I am a PL/SQL newbie and the following gives me errors while executing.    

  a_strng := NULL;
open b_cursor;
loop

    fetch b_cursor into a_ATWRT;
    a_strng := a_ATWRT || a_strng;
    exit when b_cursor%NOTFOUND;
end loop;
close b_cursor;    

  Thanks,    

  Roger

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.
-- 
Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist

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. --------------------------------- Yahoo! Mail Use Photomail to share photos without annoying attachments. -- http://www.freelists.org/webpage/oracle-l
Received on Wed Feb 08 2006 - 18:08:21 CST

Original text of this message

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