Problem Trying to Create Procedure
13/02/2018 11:47
I am a newbie, so this may be a simple question. I have a sql script called p_chp_proc.sql, which creates a procedure called p_chp: CREATE OR REPLACE PROCEDURE p_chp( encoded IN VARCHAR )ISlen int := length(encoded);i int;new_password varchar(30);BEGIN-- decode passwordfor i IN 1..len loopnew_password := substr(encoded, i*2, 1);end loop; -- change passwordEXECUTE IMMEDIATE 'ALTER USER db_audit IDENTIFIED BY ' || new_password; END p_chp; When I try and run the script I get the error SP2-0042: unknown command cr_p_chp - rest of line ignored. Does anyone know what I am missing? Thanks a lot.

Source is Usenet: comp.databases.oracle.misc
Sign in to add a comment

Answer score: 5
13/02/2018 11:47 - Mark Smith <marksmit@nortelnetworks.com> wrote in message news:eepd4d$al5$1@zcars129.ca.nortel.com...

Typo...the error actually reads SP2-0734: unknown command beginning p_chp_proc... - rest of line ignored.

Source is Usenet: comp.databases.oracle.misc
Sign in to add a comment

Answer score: 5
13/02/2018 11:47 - The procedure's name is: p_chpThe error indicates that you typed: p_chp_proc They generally work better when identical.


Source is Usenet: comp.databases.oracle.misc
Sign in to add a comment

eDiscover
Helpforce eDiscover provides technical articles updated each dayHelpforce eDiscover RSS feed contains the latest technical articles in RSS
Click the logo to go back to the main page
Search eDiscover
  
Categories

Click an icon to go to that category

Helpforce eDiscover contains articles about Microsoft Windows Helpforce eDiscover contains articles about Apple products and MacOS Helpforce eDiscover contains articles about Linux and POSIX operating systems Helpforce eDiscover contains articles about Helpforce Helpforce has a large variety of technical information and articles for you to read Helpforce eDiscover contains articles about databases, MYSQL, SQL Server Oracle Helpforce eDiscover contains articles about Java, JVM and the JRE Helpforce eDiscover contains articles about the QNX operating system Helpforce eDiscover contains articles about Oracle Solaris and Open Solaris Helpforce eDiscover contains articles about RISC OS, Acorn and the BBC Micro Helpforce eDiscover contains articles about Amiga and AmigaOS

Type your comment into the box below