ora-06550

Issue with PL-SQL: ORA-06550

萝らか妹 提交于 2019-12-26 05:40:58
问题 I'm trying to learn a bit of PL-SQL using a tutorial by examples book, but one of the suggested codes return the following error when run: ORA-06550: line 10, column 48: PL/SQL: ORA-00947: not enough values ORA-06550: line 9, column 1: PL/SQL: SQL Statement ignored Could you please help me understand what I'm doing wrong? Many thanks in advance! Simone. SQL Fiddle Oracle 11g R2 Schema Setup : create table product (code integer primary key, name varchar2 (20), type varchar2(8),price number(4,2

ORA-06550 and PLS-00103

牧云@^-^@ 提交于 2019-12-13 15:33:33
问题 HI, I am using UNIX OS and working on oracle. I am getting the error message below E ORA-06550: line 1, column 8: PLS-00103: Encountered the symbol "" when expecting one of the following: begin function package pragma procedure subtype type use <an identifier> <a double-quoted delimited-identifier> form current cursor The symbol "" was ignored. ORA-06550: line 2, column 27: PLS-00103: Encountered the symbol "" when expecting one of the following: begin function package pragma procedure

java.sql.SQLException: ORA-06550

十年热恋 提交于 2019-12-13 07:09:15
问题 When I am trying to execute this sql statement, I am getting exception as- java.sql.SQLException: ORA-06550: line 1, column 429: PLS-00103: Encountered the symbol "/" The symbol "/" was ignored. This is the below sql String that I am executing- Is there anything wrong with this sql? It will check whether table is there or not, if it is there then it will not create a table and if it is not there, then it will create a table. public static final String CREATE1 = "DECLARE " + "t_count INTEGER;

Calling Oracle PL/SQL PLS-00201: identifier '001' must be declared

风流意气都作罢 提交于 2019-12-12 17:08:09
问题 I am trying to call a PL/SQL script with the following header: PL/SQL: CREATE OR REPLACE PROCEDURE GETQUOTE(i_QUOTEID IN HR.QUOTEID, o_QUOTE OUT HR.QUOTE) Execute command: DECLARE c VARCHAR2(100); BEGIN HR.GETQUOTE("001", c); END; / Error: declare c varchar2(100); begin HR.GETQUOTE("001", c); end; ORA-06550: line 4, column 29: PLS-00201: identifier '001' must be declared ORA-06550: line 4, column 1: PL/SQL: Statement ignored 回答1: You are using the wrong types of quotes. If you want 001 to be

PLS-00302: Telling me my stored procedure isn't declared

女生的网名这么多〃 提交于 2019-12-11 07:26:29
问题 Here is where the error is occurring in the stack: public static IKSList<DataParameter> Search(int categoryID, int departmentID, string title) { Database db = new Database(DatabaseConfig.CommonConnString, DatabaseConfig.CommonSchemaOwner, "pkg_data_params_new", "spdata_params_search"); db.AddParameter("category_id", categoryID); db.AddParameter("department_id", departmentID); db.AddParameter("title", title, title.Length); DataView temp = db.Execute_DataView(); IKSList<DataParameter> dps = new

Using bind variables in SQL Plus with more than one row returned?

强颜欢笑 提交于 2019-12-11 03:22:40
问题 This is a stupid problem, but I can't seem to get around it. I have a query that's causing trouble in an OCI program, so I want to run it manually in SQL*Plus to check if there is any difference there. This is the query: select e.label as doc_name, e.url, i.item_id, 'multi' as form_type from cr_items i, cr_extlinks e where i.parent_id = :comment_id and e.extlink_id = i.item_id UNION select null as doc_name, utl_raw.cast_to_varchar2(DBMS_LOB.SUBSTR(r.content, 2000, 1)) as url, r.item_id,

Calling an Oracle stored procedure in C# using “Oracle.DataAccess” (with a parameter)

荒凉一梦 提交于 2019-12-06 08:38:48
问题 So I'm trying to call an Oracle stored procedure from my C# .NET application. Most online references I can find suggest "using System.Data.OracleClient;", but .Net 3.5 doesn't recognize that namespace so I'm using "Oracle.DataAccess.Client" instead. Here's some paraphrasing of my code below, with a previously setup and tested OracleConnection called 'myConn' already filled with parameter ':arg_myArg' (it's a number, if that matters): command.Connection = myConn; command.CommandType =

Calling an Oracle stored procedure in C# using “Oracle.DataAccess” (with a parameter)

纵然是瞬间 提交于 2019-12-04 12:43:05
So I'm trying to call an Oracle stored procedure from my C# .NET application. Most online references I can find suggest "using System.Data.OracleClient;", but .Net 3.5 doesn't recognize that namespace so I'm using "Oracle.DataAccess.Client" instead. Here's some paraphrasing of my code below, with a previously setup and tested OracleConnection called 'myConn' already filled with parameter ':arg_myArg' (it's a number, if that matters): command.Connection = myConn; command.CommandType = CommandType.StoredProcedure; command.CommandText = "exec mySchema.myProc(:arg_myArg)" command.ExecuteNonQuery()

“SQLException: ORA-06550” when calling PL/SQL function from Java

匿名 (未验证) 提交于 2019-12-03 03:03:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to use Java to retrieve data from database and display it, so I created this PL/SQL function, which returns a cursor: create or replace function std_getInfoFunc return types.cursortype as my_cursor types.cursorType; begin open my_cursor FOR SELECT s.FirstName, s.LastName, s.Address, s.City, s.Province , s.PostalCode, c.CourseName FROM Students s, Courses c, StudentAndCourses cs Where s.StudentID = cs.StudentID AND c.CourseID = cs.CourseID; Return my_cursor; end; In my Java code, I call the function as follows: try{ CallableStatement

Using variables in PLSQL SELECT statement

孤街浪徒 提交于 2019-11-28 13:50:08
I have a query that queries on ReportStartDate and ReportEndDate so I thought I would use variables in PLSQL. Not sure what I am missing here, but I get an error: CLEAR; DECLARE varReportStartDate Date := to_date('05/01/2010', 'mm/dd/yyyy'); varReportEndDate Date := to_date('05/31/2010', 'mm/dd/yyyy'); BEGIN SELECT 'Value TYPE', 1 AS CountType1, 2 AS CountType2, 3 AS CountType3 FROM DUAL; SELECT COUNT (*) FROM CDR.MSRS_E_INADVCH WHERE 1=1 AND ReportStartDate = varReportStartDate AND ReportEndDate = varReportEndDate ; END; / The Error is: Error starting at line 2 in command: Error report: ORA