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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Question about pl/sql blocks

Re: Question about pl/sql blocks

From: Walter T Rejuney <BlueSax_at_Unforgetable.com>
Date: Tue, 10 Oct 2000 10:14:20 -0400
Message-ID: <39E3243B.47A7FCD1@Unforgetable.com>

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 Received on Tue Oct 10 2000 - 09:14:20 CDT

Original text of this message

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