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

Home -> Community -> Usenet -> c.d.o.misc -> Re: String literals in PL/SQL

Re: String literals in PL/SQL

From: Sybrand Bakker <postbus_at_sybrandb.nospam.demon.nl>
Date: Thu, 11 Sep 2003 19:18:40 +0200
Message-ID: <vm1cjs1j2e565a@corp.supernews.com>

"Michael Young" <michael.young_at_paetec.com> wrote in message news:83f9daa0.0309110835.10080c50_at_posting.google.com...
> How does one embed line feeds into a string literal?
> Can a string literal be "broken up" in multiple string literals?
>
> Basically, I'm trying to create table comments. The syntax is
>
> comment on table <table name> is '<comment text>'
>
> The comment text must be a string literal. The comments I want to
> generate really are best formatted into a few lines, so I want to
> include line feeds in the string literal itself. Alas, I haven't
> figured out how...
> Also, since the comment text can get fairly long, I'd like to break up
> the string literals over several lines so that the comment is readable
> in the source script using a standard editor (without resorting to
> scrolling). In 'C', two adjacent string literals separated by white
> space are automatically concatentated, but this is not the case in
> PL/SQL. Again, how to do anything like this eludes me...
> Of course, I might be able to accomplish the desired results by using
> dynamic SQL, but I'd like to avoid that avenue, if possible.

You may want to check the length of the comment possible in dba_tab_comments and/or dba_col_comments. IIRC, 255 chars will be the maximum. You would be better off by using a case tool like Designer

-- 
Sybrand Bakker
Senior Oracle DBA

to reply remove '-verwijderdit' from my e-mail address
Received on Thu Sep 11 2003 - 12:18:40 CDT

Original text of this message

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