Re: How to Add new line character to Varchar2 Field
From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 8 Jul 2002 18:17:28 -0700
Message-ID: <92eeeff0.0207081717.2f1f00f_at_posting.google.com>
Date: 8 Jul 2002 18:17:28 -0700
Message-ID: <92eeeff0.0207081717.2f1f00f_at_posting.google.com>
amselvan_at_yahoo.com (amselvan) wrote in message news:<7e67ac08.0207080756.55bf2c5f_at_posting.google.com>...
> Hi,
> I need to insert a string with newline characters in it.
> How will i do that in PL/SQL.
> Thanks for any answers
> Regards,
> amselvan
Use ASCII value of LineFeed which is CHR(10).
SELECT 'ABC Corp'||CHR(10)||'2000 Any Street'||CHR(10)||'Any Town, ZZ 99999' FROM dual;
will give you
ABC Corp
2000 Any Street
Any Town, ZZ 99999
In PLSQL you can assign the above value as,
your_var_ := 'ABC Corp'||CHR(10)||'2000 Any Street'||CHR(10)||'Any Town, ZZ 99999';
HTH
//Rauf Sarwar
Received on Tue Jul 09 2002 - 03:17:28 CEST