ora-00900

PLSQL procedure execution error invalid statement

点点圈 提交于 2019-12-24 10:09:12
问题 I'm following a tutorial on PL/SQL http://www.plsqltutorial.com/plsql-procedure/. I have created procedure with the following code on apex: CREATE OR REPLACE PROCEDURE adjust_salary( in_employee_id IN EMPLOYEES.EMPLOYEE_ID%TYPE, in_percent IN NUMBER ) IS BEGIN UPDATE EMPLOYEES SET salary = salary + salary * in_percent / 100 WHERE employee_id = in_employee_id; END; However when I try to run exec adjust_salary(200,5); I got error ORA-00900: invalid SQL statement. What is the problem and how to

PLSQL procedure execution error invalid statement

房东的猫 提交于 2019-12-24 10:06:06
问题 I'm following a tutorial on PL/SQL http://www.plsqltutorial.com/plsql-procedure/. I have created procedure with the following code on apex: CREATE OR REPLACE PROCEDURE adjust_salary( in_employee_id IN EMPLOYEES.EMPLOYEE_ID%TYPE, in_percent IN NUMBER ) IS BEGIN UPDATE EMPLOYEES SET salary = salary + salary * in_percent / 100 WHERE employee_id = in_employee_id; END; However when I try to run exec adjust_salary(200,5); I got error ORA-00900: invalid SQL statement. What is the problem and how to

Problem with execute procedure in PL/SQL Developer

我们两清 提交于 2019-12-18 07:38:09
问题 I this is my first attempt to create procedure and execute it. First I create simple table. DB scheme of table is here: Table name: Ziaci Columns: ZiakId - primary key, number Surname, varchar2 FirstName, varchar2 TriedaId - forgein key, number Store procedure only insert data in table, I created store procudure with this SQL cmd: create procedure ziaci_proc(surname_in in varchar2, firstname_in in varchar2, triedaid_in in number) is begin insert into ziaci (surname, firstname,triedaid) values

Problem with execute procedure in PL/SQL Developer

大憨熊 提交于 2019-12-18 07:38:04
问题 I this is my first attempt to create procedure and execute it. First I create simple table. DB scheme of table is here: Table name: Ziaci Columns: ZiakId - primary key, number Surname, varchar2 FirstName, varchar2 TriedaId - forgein key, number Store procedure only insert data in table, I created store procudure with this SQL cmd: create procedure ziaci_proc(surname_in in varchar2, firstname_in in varchar2, triedaid_in in number) is begin insert into ziaci (surname, firstname,triedaid) values

How to execute an oracle stored procedure?

故事扮演 提交于 2019-12-17 17:59:41
问题 I am using oracle 10g express edition. It has a nice ui for db developers. But i am facing some problems executing stored procedures. Procedure: create or replace procedure temp_proc is begin DBMS_OUTPUT.PUT_LINE('Test'); end it is created successfully. But when i execute: execute temp_proc; it shows ORA-00900: invalid SQL statement So help needed here 回答1: Execute is sql*plus syntax .. try wrapping your call in begin .. end like this: begin temp_proc; end; (Although Jeffrey says this doesn't

Using SQL stored function gives invalid SQL statement

元气小坏坏 提交于 2019-12-12 17:24:45
问题 I'm trying to use stored function from Oracle Express database in c# application. OdbcCommand com = new OdbcCommand("SILNIA",sqlConn); com.CommandType = CommandType.StoredProcedure; OdbcParameter sqlParam = new OdbcParameter("@ReturnValue", OdbcType.Int); sqlParam.Direction = ParameterDirection.ReturnValue; com.Parameters.Add(sqlParam); com.ExecuteNonQuery(); label1.Content = com.Parameters["@ReturnValue"].Value.ToString(); where SILNIA function (compiles without errors) is defined: create or

Switching users on a JDBC Connection

▼魔方 西西 提交于 2019-12-06 04:42:46
问题 I am writing a Java JDBC database application that connects to an Oracle 11g database and am using a c3p0 connection pool. For the purposes of an example, I have 3 database users DEFAULT, TOM, and BILL. c3p0 opens all of the pooled Connections with the DEFAULT database user. I would like to retrieve one of the pooled Connections from c3p0 and change the user for the Connection to be BILL instead of DEFAULT. Is it possible to do this in JDBC without establishing a new connection with the

How to execute an oracle stored procedure?

一世执手 提交于 2019-11-28 06:10:46
I am using oracle 10g express edition. It has a nice ui for db developers. But i am facing some problems executing stored procedures. Procedure: create or replace procedure temp_proc is begin DBMS_OUTPUT.PUT_LINE('Test'); end it is created successfully. But when i execute: execute temp_proc; it shows ORA-00900: invalid SQL statement So help needed here Execute is sql*plus syntax .. try wrapping your call in begin .. end like this: begin temp_proc; end; (Although Jeffrey says this doesn't work in APEX .. but you're trying to get this to run in SQLDeveloper .. try the 'Run' menu there.) Oracle