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: Please help - stored procedure

Re: Please help - stored procedure

From: Wm. G. Urquhart <william_at_devnet-uk.net>
Date: 2000/04/25
Message-ID: <MPG.136fe174db4b1527989688@news.usenetserver.com>#1/1

If you want to use this sort of SQL as part of a SP you need to use the dynamic SQL Package.

-- 
Regards,


William.
 
EuroNet*Internet BV, http://www.euronet.nl/
Wm. G. Urquhart, Oracle DBA
Muiderstraat 1, Postbus 11095, 1001 GB Amsterdam
T:+31 20 5355263, F:+31 20 5355400, E: williamu_at_nl.euro.net
M:+31 06 28206038 ICQ: 56047340

In article <_shN4.1147$Ip.36081_at_cac1.rdr.news.psi.ca>, tcgs_at_hotmail.com 
says...

> Hi Experts,
>
> I am new to Oracle & trying to create a following stored procedure.
>
> create procedure change_password (userid in varchar2, passwd in varchar2)
> as begin
> alter user userid identified by passwd;
> end;
>
> The idea is to create a stored proc and allow users to change their password
> from a
> front-end application. I get the following message when I try to save the
> procedure.
>
> PLS-00103: Encountered the symbol "ALTER" when expecting one of the
> following:
> begin declare exit for goto if loop mod null pragma raise
> return select update while <an identifier>
> <a double-quoted delimited-identifier> <a bind variable> <<
> close current delete fetch lock insert open rollback
> savepoint set sql commit <a single-quoted SQL string>
>
> Can anyone tell me what is wrong with this code? If there is a better way to
> do it, please show me
>
> Thanks
>
> CGS
> tcgs_at_hotmail.com
>
>
>
>
>
Received on Tue Apr 25 2000 - 00:00:00 CDT

Original text of this message

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