From: Walter T Rejuney <BlueSax@Unforgetable.com>
Newsgroups: comp.databases.oracle.misc
Subject: Re: Question about pl/sql blocks
Date: Tue, 10 Oct 2000 10:14:20 -0400
Organization: xyzzy
Lines: 27
Message-ID: <39E3243B.47A7FCD1@Unforgetable.com>
References: <dki3us09tulh6gari6apvabup6tdm7damu@4ax.com> <39e23e88.31931695@News.ai.com> <QSEE5.51$ww1.38974@wdc-read-01.qwest.net>
Reply-To: BlueSax@Unforgetable.com
NNTP-Posting-Host: ga0235kstahl.mmr.avaya.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.73 [en] (Win95; U)
X-Accept-Language: en


Mike Dwyer wrote:

> I'm sure you meant TO_CHAR( birthdate, 'Day').
>
> But the prompt will probably be in a SQL*Plus script. I'm not sure how you
> would write interactive code in PL/SQL.
>

Trying to write such things completely in PL/SQL would be an abuse of the
language since it simply isn't designed for such things. I suppose that it
would be possible to force fit something, but why would anyone want to do that
when there are better methods available.

For instance, why not write a VBScript program that would handle the prompt
and then use ADO to query the database? What about writing an ASP that will
display the prompt in a user-friendly manner and also trap input errors? What
about using something like Crystal Reports that would accept the date as input
and output the correct information. There are probably hundreds of ways of
doing this, but none of them involve using PL/SQL in a way that was never
intended.

Still, if you are working on a UNIX system, I'll give you two hints: 1)
UTL_FILE.GET_LINE 2) /dev/fd/1 = stdin.

If those two hints don't cause a light bulb to come on in your mind then you
are not ready to write that type of solution in PL/SQL


