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 -> String literals in PL/SQL

String literals in PL/SQL

From: Michael Young <michael.young_at_paetec.com>
Date: 11 Sep 2003 09:35:14 -0700
Message-ID: <83f9daa0.0309110835.10080c50@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. Received on Thu Sep 11 2003 - 11:35:14 CDT

Original text of this message

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