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

Home -> Community -> Usenet -> c.d.o.misc -> Re: checking the input of ACCEPT

Re: checking the input of ACCEPT

From: Jörg Schneider <Joerg.Schneider_at_ORGAPLAN_NOSP.de>
Date: Mon, 8 Jul 2002 07:12:57 +0200
Message-ID: <agb6rv$e6i$1@newsreader2.netcologne.de>


Thank you both for you help. It works fine.

Jörg Schneider

<Christopher.Jones_at_oracle.comX> schrieb im Newsbeitrag news:ud6tz2af7.fsf_at_oracle.comX...
> rsarwar_at_ifsna.com (Rauf Sarwar) writes:
>
> In addition to the suggestion below, investigate the usefulness of the
> FORMAT option to the ACCEPT command. See
http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/server.920 /a90842/ch13.htm#1006991
>
> For example:
>
> ACCEPT drop_user DEFAULT 'N' FORMAT A1 PROMPT 'Drop user? Y/[N] :'
>
> Chris
>
> > "J?g Schneider" <Joerg.Schneider_at_ORGAPLAN_NOSP.de> wrote in message
news:<ag4991$i3e$1_at_newsreader2.netcologne.de>...
> > > Hello together,
> > >
> > > we want to drop users in a database by a script with sqlplus. There
should
> > > be warnings and an input like "The user will be deleted. Are you
shure?
> > > (Y/N)" before the drop. Now we have to check the input wether there is
"Y"
> > > or "N"? How can we do this?
> > >
> > > Source:
> > >
> > > ACCEPT x char PROMPT "The user will be deleted. Are you shure? (Y/N)"
> > >
> > > Thank you for helping
> > >
> > > Jörg
> >
> >
> > ACCEPT drop_user DEFAULT 'N' PROMPT 'The user will be deleted. Are you
sure? (Y/N) '
> >
> > BEGIN
> > IF Upper(Substr('&drop_user', 1, 1)) = 'Y' THEN
> > EXECUTE IMMEDIATE '.......';
> > END IF;
> > END;
> > /
> >
> > HTH
> > //Rauf Sarwar
>
> --
> Christopher Jones, Oracle Corporation, Australia.
Received on Mon Jul 08 2002 - 00:12:57 CDT

Original text of this message

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