Oracle Error Pls-00488
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up procedure declaration error (PLS-00488) up vote 0 down vote favorite I am trying to make a procedure return a subset of records as a single type a_ntt meeting a certain requirement for which I am trying to define a cursor a_cur, and this is the relevant code for my question: a_t a_cur%ROWTYPE; TYPE a_ntt IS TABLE OF a_t; l_a a_ntt; My database server throws PLS-00488 (invalid variable declaration object must be a type or subtype) considering variable a_t. I would like to know why. To me it seems I have provided a type to a_t, I would suggest ROWTYPE does that for me, but obviously I am not getting something. I would like to know why this error occurs, why declaring a_t as a_cur%ROWTYPE does not prevent this. Just to make sure, I have resolved the issue by adding %TYPE to the line, so TYPE a_ntt IS TABLE OF a_t%TYPE;, but I would like to know why this is necessary. plsql oracle-sqldeveloper share|improve this question edited Dec 15 '14 at 10:52 asked Dec 15 '14 at 10:36 Wokkelsok 1156 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote accepted a_t is not a type. It is a variable whose type is a_cur%ROWTYPE. You can't use it as a type. a_t%TYPE is a type though, so that works. The syntax diagrams for the "collection variable declaration" is in the PL/SQL docs. You'll see that either you need a type, or a rowtype_attribute which has cursor, table or view name with %ROWTYPE attached, or a type_attribute which is essentially a variable name with %TYPE attached. share|improve this answer edited Dec 15 '14 at 11:23 answered Dec 15 '14 at 11:10 Mat 136k21235274 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged plsql oracle-sqldeveloper or ask your own question. asked 1 year ago viewed 1033 times active 1 year ago Related 16How can I use Oracle SQL develop
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; http://stackoverflow.com/questions/27482124/procedure-declaration-error-pls-00488 it only takes a minute: Sign up creating a stored procedure in Oracle complain about invalid variable declaration up vote 1 down vote favorite When I try to create a stored procedure like this: create or replace procedure USR_Trial ( auth out usrr.DEPARTMENT ) AS BEGIN select authority_id into auth from usrr where user_id='G68EF610'; END USR_Trial; I get the http://stackoverflow.com/questions/5230589/creating-a-stored-procedure-in-oracle-complain-about-invalid-variable-declaratio following error: Error(2,1): PLS-00488: invalid variable declaration: object 'USRR.DEPARTMENT' must be a type or subtype How can I fix this? oracle stored-procedures plsql share|improve this question edited Mar 30 '11 at 2:43 Jon Heller 17.3k32562 asked Mar 8 '11 at 9:29 Manoj Wadhwani 52031322 add a comment| 1 Answer 1 active oldest votes up vote 6 down vote If usrr.DEPARTMENT is a column in a table and you want the OUT parameter to be of the same datatype as that column then the syntax is: create or replace procedure USR_Trial ( auth out usrr.DEPARTMENT%type ) ... share|improve this answer answered Mar 8 '11 at 9:35 Tony Andrews 88.2k12144196 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged oracle stored-procedures plsq
CommunityOracle User Group CommunityTopliners CommunityOTN Speaker BureauJava CommunityError: You don't have JavaScript enabled. This tool uses JavaScript and much of it will not work correctly without it enabled. Please turn JavaScript https://community.oracle.com/thread/2493756 back on and reload this page. Please enter a title. You can not post a blank message. Please type your message and try again. More discussions http://www.orasite.com/errores/pls/pagina_2 in PL/SQL and SQL All PlacesDatabaseDatabase Application DevelopmentPL/SQL and SQL This discussion is archived 5 Replies Latest reply on Jan 29, 2013 1:08 PM by Karthick2003 PL/SQL: oracle error SQL Statement ignoredfo 985905 Jan 28, 2013 6:36 PM Hi folks I'm new to pl sql I'm trying this pl sql code with the jobs table of the HR schema CREATE OR REPLACE PROCEDURE proc_test ( job_id_param JOBS.JOB_ID%TYPE ) IS BEGIN DECLARE job_rec_type JOBS%ROWTYPE; job_rec job_rec_type; BEGIN SELECT * INTO job_rec FROM JOBS oracle error pls-00488 WHERE JOB_ID LIKE(job_id_param); END; END; I'm getting the PL/SQL: SQL Statement ignored at the SELECT * INTO job_rec FROM JOBS WHERE JOB_ID line so what's wrong with that code Thank you I have the same question Show 0 Likes(0) 90Views Tags: none (add) ignoredContent tagged with ignored, insideContent tagged with inside, procedureContent tagged with procedure, selectContent tagged with select, sqlContent tagged with sql, statementContent tagged with statement This content has been marked as final. Show 5 replies 1. Re: PL/SQL: SQL Statement ignoredfo SomeoneElse Jan 28, 2013 6:47 PM (in response to 985905) job_rec_type JOBS%ROWTYPE; job_rec job_rec_type;You don't declare a rowtype like this. Try this instead: SQL> declare 2 dual_rec_type dual%rowtype; 3 dual_rec dual_rec_type; 4 begin 5 select * 6 into dual_rec 7 from dual; 8 end; 9 / dual_rec dual_rec_type; * ERROR at line 3: ORA-06550: line 3, column 13: PLS-00488: 'DUAL_REC_TYPE' must be a typ
Subprogram 'string' violates its associated pragma PLS-00488: invalid variable declaration: object 'string' must be a type or subtype PLS-00564: lob arguments are not permitted in calls to remote server PLS-00341: declaration of cursor 'string' is incomplete or malformed PLS-00457: expressions have to be of SQL types PLS-00923: native compilation failed: string: string: string PLS-00989: Cursor Variable in record, object, or collection is not supported by this release PLS-00421: synonym definitions nested too deeply; possible loop in synonyms PLS-00329: schema-level type has illegal reference to string PLS-00352: Unable to access another database 'string' PLS-00630: pipelined functions must have a collection return type PLS-00330: invalid use of type name or subtype name PLS-00311: the declaration of "string" is incomplete or malformed PLS-00310: with \%ROWTYPE attribute, 'string' must name a table, cursor or cursor-variable PLS-01907: : number precision too large PLS-00707: unsupported construct or internal error [string] PLS-00111: end-of-file in comment PLS-00308: this construct is not allowed as the origin of an assignment PLS-00316: PL/SQL TABLEs must use a single index PLS-00375: illegal GOTO statement; this GOTO cannot branch to label 'string' PLS-00405: subquery not allowed in this context PLS-00597: expression string in the INTO list is of wrong type PLS-00436: implementation restriction: cannot reference fields of BULK In-BIND table of records PLS-00456: item 'string' is not a cursor PLS-00331: illegal reference to string PLS-01905: : character string buffer too small PLS-00321: expression 'string' is inappropriate as the left hand side of an assignment statement PLS-00355: use of pl/sql table not allowed in this context PLS-00324: cursor attribute may not be applied to non-cursor 'string' PLS-00536: Navigation through REF variables is not supported in PL/SQL. PLS-00351: Not logged onto database 'string' PLS-00960: RPCs cannot use variables with schema level user-defined types in this release PLS-00498: illegal use of a type before its declaration PLS-00360: cursor declaration without body needs return type PLS-01901: : host bind array too small PLS-00435: DML statement without BULK In-BIND cannot be used inside FORALL PLS-00994: Cursor Variables cannot be declared as part of a package PLS-00593: default value of parameter 'string' in body must match that of spec PLS-00305: previous use of 'string' (at line string) conflicts with this