Re: PL/SQL -- huh?

From: Peter Moore <pt_at_chaff.demon.co.uk>
Date: 1995/09/16
Message-ID: <686734450wnr_at_chaff.demon.co.uk>#1/1


In article: <jpanicoDEy7Kp.9xp_at_netcom.com> jpanico_at_netcom.com (Joe Panico) writes:

> Peter Moore (pt_at_chaff.demon.co.uk) wrote:
> : In article: <433sd3$2k0_at_zippy.cais.net> randyd_at_cais.com (Randy Dewoolfson)
> : writes:
> : >
> : > Another - slightly older trick - is to
> : >
> : > SELECT "Output String" FROM DUAL;
> : >
> : > to get something to the screen...
 

> : Not in PL/SQL, Randy. All you'd get is "PL/SQL successfully completed."
>
> That's funny, I get:
> SELECT "Output String" FROM DUAL;
> *
> ERROR at line 4:
> ORA-06550: line 4, column 24:
> PLS-00103: Encountered the symbol "FROM" when expecting one of the following:
> . ( , * _at_ % & - + / mod rem <an identifier>
> <a double-quoted string> an exponent (**) into ||
> Resuming parse at line 4, column 33.

That's because the string should have SINGLE quotes round it.

In full...

  BEGIN     SELECT 'Output String'
    FROM dual;

  END; Hope That Helps.

Pete

-- 

------------------------------------------------------------------------
|  Peter Moore - Database Administrator - MAT Transport Ltd, London, UK
|  pt_at_chaff.demon.co.uk : +44 (171) 410 6373
|  "With a little study you'll go a long ways & I wish you'd start now!"
Received on Sat Sep 16 1995 - 00:00:00 CEST

Original text of this message