Home » SQL & PL/SQL » SQL & PL/SQL » Define or Accept Not resolved
Define or Accept Not resolved [message #36107] Mon, 05 November 2001 23:57 Go to next message
homer
Messages: 17
Registered: October 2001
Junior Member
Hi everybody
I need some help, you purpose me a way to solve my problem, but it's still here.
For remember.
I want to display some informations typed by users and GET them.
####################################
For instance:
define age prompt "Your age:"
define name prompt "Your name:"
begin
dbms_output.put_line('Do you confirm these informations'||name, age);
dbms_output.put_line('Type Y or N');
-- I want get the answer
if answer=Y then .......
end;
/

Thanks a lot

----------------------------------------------------------------------
Re: Define or Accept Not resolved [message #36110 is a reply to message #36107] Tue, 06 November 2001 06:08 Go to previous messageGo to next message
jim
Messages: 74
Registered: July 2000
Member
You could try something like this:

1 set serveroutput on
2 Accept age number prompt "Your age: "
3 Accept name char prompt "Your name: "
4 Accept response char prompt "Do you confirm this information age: &age name: &name (y/n)"
5 begin
6 if '&response' = 'y' then
7 dbms_output.put_line('Yes');
8 null; -- your code goes here
9 else
10 dbms_output.put_line('No');
11 null;
12 end if;
13* end;

Save this to a file: save prog_name

execute the file: @prog_name

----------------------------------------------------------------------
Re: Define or Accept Not resolved [message #36114 is a reply to message #36107] Tue, 06 November 2001 06:42 Go to previous message
homer
Messages: 17
Registered: October 2001
Junior Member
Thanks a lot!!
It's done.
Well done.
You are really great, Go on.

An ORACLE french user who supports you.

----------------------------------------------------------------------
Previous Topic: ERROR:ORA-03121
Next Topic: Date Format
Goto Forum:
  


Current Time: Sat May 28 00:10:17 CDT 2022