Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL Programming problem
Silvercup wrote:
>
> I am trying to write a PL/SQL program that does the following:
>
> 1) accepts user input
> 2) does validity checks on the user input
> 3) depending on a particular field the user enters, I want
> to run a specific query:
> For example:
> if the user enters a record type 'C' then
> run select query1
> else
> run select query2
> 4) output the selected records to a user specified file
>
> Does anyone out there know how I can do this? I can't seem to
> get any help from the Oracle SQL*Plus documentation.
For the user input, you can use the variable binding of SQL*Plus. For the validity to output, you can use anonymous procedure to achieve it. PL/ SQLis an extension of SQL to include some logic processing.
> If anyone is really familiar with this version of Oracle, and
> you do programming in C/C++ (not OWL), could you tell me how to
> use C/C++ to also solve the above problem (ie. I need to know the
> headers, and libraries that I should use in my C/C++ program).
If you want to access Oracle with C/ C++, you can use Pro C/ C+ precompilers.
--- Name : Lun Wing San (Certified Oracle Database Administrator) Title : Oracle Application Developer of Hong Kong Productivity Council Oracle Database Administrator and System Administrator of QRC Phone : (852)27885841 This posting represents the personal opinions of the author. It is not the official opinion or policy of the author's employer. Warranty expired when you opened this article and I will not be responsible for its contents or use.Received on Sat Mar 01 1997 - 00:00:00 CST