Plsql Developer Compile Error
Contents |
back to return to the previous page. Enter your Username and Password pl sql show errors to log in. If you have not yet registered, you can register here. Username: Password: Have you forgotten your login information? Mark all read Contact Us · · Top Generated in 0.009 seconds in which 0.002 seconds were spent on a total of 3 queries. Zlib compression disabled.Powered by UBB.threads™ PHP Forum Software 7.4.1p2
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies how to compile procedure in sql developer of this site About Us Learn more about Stack Overflow the company Business pl sql show compilation errors Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask how to see compilation errors in oracle stored procedure 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 http://forums.allroundautomations.com/ubb/ubbthreads.php?ubb=showflat&Number=44015 up Procedure created with compilation errors up vote 0 down vote favorite Below is the procedure I have created. When I execute it I'm getting "Procedure created with compilation errors" I don't understand where I did mistake in below procedure code, someone help me by finding error in the code create or replace PROCEDURE newprocedur(inMerid IN VARCHAR2,outCount OUT NUMBER) AS CURSOR c1 http://stackoverflow.com/questions/13137604/procedure-created-with-compilation-errors IS select CLIENT_COUNT from OP_TMER_CONF_PARENT where MER_ID = inMerid FOR UPDATE OF CLIENT_COUNT; BEGIN Open c1 loop fetch c1 into outCount; exit when c1%NOTFOUND; outCount:=outCount+1; update OP_TMER_CONF_PARENT set CLIENT_COUNT = outCount where current of c1; end loop; close c1; END; Thanks in advance stored-procedures plsql oracle10g oracle11g plsqldeveloper share|improve this question edited Oct 30 '12 at 12:07 Nicholas Krasnov 19.2k42849 asked Oct 30 '12 at 11:03 1001 839 1 How many records are you expecting to update? If just 1, you can do this in a single SQL statement! Hint: use the returning clause. –Colin 't Hart Oct 30 '12 at 11:22 Something like: update op_tmer_conf_parent set client_count = client_count + 1 where mer_id = inMerid returning client_count into outCount; –Colin 't Hart Oct 30 '12 at 12:04 add a comment| 2 Answers 2 active oldest votes up vote 3 down vote 1- check for errors and see where error is See here 2- You missed a semicolon in 5th line- should be Open c1; share|improve this answer answered Oct 30 '12 at 11:20 A.B.Cade 13.5k1937 thankyou for your quick respon
a PL/SQL procedure using Oracle SQL Developer. Time to Complete Approximately 30 minutes. Overview Oracle SQL http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/11g/r2/prod/appdev/sqldev/plsql_debug/plsql_debug_otn.htm Developer is a free graphical tool that enhances productivity and simplifies http://docstore.mik.ua/orelly/oracle/advprog/ch15_01.htm database development tasks. With Oracle SQL Developer, you can browse database objects, run SQL statements and SQL scripts, and edit and debug PL/SQL statements. You can also run any number of provided reports, as well as create and save your own. This tutorial focuses sql developer on creating, compiling, running and debugging PL/SQL. Prerequisites Before starting this tutorial, you should: Install Oracle SQL Developer 2.1 early adopter from OTN here. Follow the readme instructions here. Install the Oracle Database 10g and later. Unlock the HR user. Login to SQL*Plus as the SYS user and execute the following command: alter user hr identified how to see by hr account unlock; Download and unzip the plsql_debug.zip file that contains all the files you need to perform this tutorial. Creating a Database Connection To create a database connection, perform the following steps: . Open SQL Developer. . In the Connections tab, right-click Connections and select New Connection. . Enter the following and click Test: Connection Name: hr_orcl Username: hr Password: hr Select Save Password checkbox Hostname: localhost Port: 1521 SID: orcl . The status of the connection was tested successfully. The connection was not saved however. To save the connection, click Connect. . Once the connection is saved, you will see the database in the list. When a connection is created, a SQL Worksheet is opened automatically. The SQL Worksheet allows you to execute SQL against the connection you just created. Expand the hr_orcl connection. Browsing Your Database The Connections Navigator in Oracle SQL Developer allows you to browse and edit database objects. This tutorial creates and debugs PL/
which allow you to view both stored source code and compile errors. It provides an alternative to the SQL*Plus SHOW ERRORS command which offers you significantly more information about your compile problem. It allows you to quickly scan PL/SQL source code stored in the data dictionary. This chapter shows you how to use the PLVvu programs and also explores the steps involved in constructing a utility like PLVvu. Before diving into the programs provided by PLVvu, however, let's review the situation most PL/SQL developers around the world face on a daily basis as they try to compile their code. 15.1 Compiling PL/SQL Code in SQL*Plus Suppose that you work really, really hard at building this very complicated PL/SQL program. It's a big one, but you feel as if you've got a handle on it. You "create or replace" it in SQL*Plus and here is what you see: SQL> start bigone.sql Warning: Procedure created with compilation errors. You groan. At the same time, you realize that you weren't very likely to get it all right the first time. Well, it's time to find out what the error is. Fortunately, Oracle Corporation provides a utility to view the compile errors: the SHOW ERRORS command. SQL> show errors LINE/COL ERROR -------- -------------------------------------------------------------- 624/10 PLS-00103: Encountered the symbol "IF" when expecting one of the following: * & = - + ; < / > in mod not rem an exponent (**) <> or != or ~= >= <= <> and or like between is null etc. ; was inserted before "IF" to continue. Wow. Underwhelmed or what? Let's see...so, this error of some kind was found on the tenth character of line 624. Line 624, eh? I open up the file containing my fantastic new program and go down to line 624. Here is what I find: 622 FOR data_rec IN data_cur 623 LOOP 624 restructure (data_rec.key_val); 635 END LOOP; Not an IF in sight. My sense of elation deflates. Getting this program to compile is going to be more difficult that I had thought. What is going on and why am I so depressed? The most critical problem is that SHOW ERRORS does not actually show the line of code upon which the error was found. And even if it did show you that line, it might not necessarily reveal the error, since the error might actually occur on a different line, as you saw above. 15.1.1 Compiling Stored Code When you compile a PL/SQL program in SQL*Plus from a file, the following actions occur: SQL*Plus strips out all blank lines (!) and passes them on to the SQL layer ("create or replace" is a DDL statement). The PL/SQL program is compiled. The source code in the file is loaded into the dat