Pl Sql Error 103 Line
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 PL/SQL Function Error - PLS-00103: Encountered the symbol “IS” up vote 1 down vote favorite I am trying to create a simple PL/SQL function but its returning error -> PLS-00103: Encountered the symbol "IS". I am not sure whats wrong here, so could anybody out there please help. I followed the following steps - Step1 - Logged in as sysdba using - sqlplus / as sysdba Step2 - Created a file name test.sql with following code under C:\ - CREATE OR REPLACE FUNCTION employer_details_func RETURN VARCHAR(20); IS emp_name VARCHAR(20); BEGIN SELECT first_name INTO emp_name FROM emp_tbl WHERE empID = '100'; RETURN emp_name; END; / Step3 - Ran the following commands - SQL>@C:\test.sql Warning: Function created with compilation errors. SQL> show error function Func; Errors for FUNCTION FUNC: LINE/COL ERROR 5/1 PLS-00103: Encountered the symbol "IS" SQL> Don't know why am I getting this weird error. Any help is highly appreciated. function plsql compiler-errors share|improve this question asked Nov 4 '12 at 5:07 anujin 25041533 1 When you login AS SYSDBA you connect to the SYS account. Please please please do not do this. SYS is a very powerful account because it owns the data dictionary. Consequently it is very easy to corrupt the database working as SYS if we don't understand what we;re doing. No offense, but the tenor of your question (a trivial syntax error) suggests this is your situation. Use SYS to create an application user, then use that to create schema objects. –APC Nov 4 '12 at 13:59 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote Create your function as follows and try CREATE OR REPLACE FUNCTION employer_details_func RETURN VARCHAR2 IS emp_name VARCHAR2 (20); BEGIN SELECT first_name INTO emp_name FROM emp_tbl WHERE empID = '100'; RETURN emp_name; E
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 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 in PL/SQL and SQL All PlacesDatabaseDatabase Application DevelopmentPL/SQL and SQL This discussion is archived 1 2 3 Previous Next 35 Replies Latest reply on Oct 9, 2006 2:01 PM by BluShadow Go to original post This content has been marked as final. Show 35 replies 30. Re: PL/SQL ERROR 103 - Line 2 .Found ';' where http://stackoverflow.com/questions/13216228/pl-sql-function-error-pls-00103-encountered-the-symbol-is the following was expected ' RadhakrishnaSarma Oct 9, 2006 1:40 PM (in response to user530299) At least Hindi? Aap ka friend ka machine mein yeh jo syntax errors ham dikhaye then na, abhi bhi uska system ka code mein hai kya? At least are you a Kannadiga? Mujhe Kannada bhi aatha hai! Cheers Sarma. Like Show 0 Likes(0) Actions 31. Re: PL/SQL ERROR 103 - Line 2 .Found https://community.oracle.com/thread/433688?start=30&tstart=0 ';' where the following was expected ' user530299 Oct 9, 2006 1:43 PM (in response to RadhakrishnaSarma) I know hindi,kannada and tamil. yes, its still there. even today he told me that he could compile it successfully when i asked him as to why i'm facing this tech issue. Like Show 0 Likes(0) Actions 32. Re: PL/SQL ERROR 103 - Line 2 .Found ';' where the following was expected ' RadhakrishnaSarma Oct 9, 2006 1:48 PM (in response to user530299) Even if the syntax error is still there, how could he compile succesfully, I don't understand. Nange ondu doubt ide. Neevu compile madavudu datablock ade antha confirmaa? Yaake andre, naavu thorsiddivi alla, aa errors iddre code alli, compile aagalla. Neevu yaavaaginda Forms alli kelasa maadthaayiddiyaaa? Cheers Sarma. Like Show 0 Likes(0) Actions 33. Re: PL/SQL ERROR 103 - Line 2 .Found ';' where the following was expected ' BluShadow Oct 9, 2006 1:54 PM (in response to RadhakrishnaSarma) Well this does make for interesting reading doesn't it. :o\ Like Show 0 Likes(0) Actions 34. Re: PL/SQL ERROR 103 - Line 2 .Found ';' where the following was expected ' RadhakrishnaSarma Oct 9, 2006 1:58 PM (in response to BluShadow) Kidding? ;-)
visit, be sure to check out the FAQ by clicking the link http://www.dbforums.com/showthread.php?987937-Pl-sql-That-Works-In-Sqlplus-But-Not-In-Forms above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you https://books.google.gr/books?id=OV8nCgAAQBAJ&pg=PA91&lpg=PA91&dq=pl+sql+error+103+line&source=bl&ots=emMNvxum64&sig=VC81HdCqtJ3N9H2oSxbkQFh0kEk&hl=en&sa=X&ved=0ahUKEwjauuaesefPAhUKEiwKHVYvCcEQ6AEIYDAJ want to visit from the selection below. Results 1 to 3 of 3 Thread: Pl/sql That Works In Sqlplus But Not In Forms Tweet Thread pl sql Tools Show Printable Version Subscribe to this Thread… Search Thread Advanced Search Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 03-11-04,08:06 #1 palaniappan View Profile View Forum Posts Registered User Join Date Mar 2004 Location Chennai, India Posts 18 Unanswered: Pl/sql That Works In Sqlplus But Not In pl sql error Forms Hi, This is a PL/SQL that I wrote and was able to execute this in sqlplus. But when I used the same in a trigger in Oracle forms it gives a error. DECLARE TYPE CV_TYPE IS REF CURSOR; CV CV_TYPE; PARTICIPANT_KEY VARCHAR2 (100); SALES_REP_CD VARCHAR2 (100); SALES_REP_KEY VARCHAR2 (100); STR VARCHAR2(100); STR1 VARCHAR2(100); STR2 VARCHAR2(100); BEGIN STR2 := 'a.PARTICIPANT_KEY = 10002'; OPEN CV FOR 'SELECT A.PARTICIPANT_KEY PARTICIPANT_KEY, B.SALES_REP_CD,B.SALES_REP_KEY FROM PARTICIPANT_MASTER A,PARTICIPANT_TERRITORY B WHERE A.PARTICIPANT_KEY = B.PARTICIPANT_KEY AND ' || STR2; STR:='SALES_REP_CD'; LOOP FETCH CV INTO PARTICIPANT_KEY, SALES_REP_CD, SALES_REP_KEY; EXIT WHEN CV%NOTFOUND; STR1 := NULL; IF STR = 'PARTICIPANT_KEY' THEN STR1 := STR1||','||PARTICIPANT_KEY; END IF; IF STR = 'SALES_REP_CD' THEN STR1 := STR1||','||SALES_REP_CD; END IF; IF STR = 'SALES_REP_KEY' THEN STR1 := STR1||','||SALES_REP_KEY; END IF; DBMS_OUTPUT.PUT_LINE(STR1); END LOOP; END; Error Message : Error 103 at line 16,column 10 Encountered the symbol "SELECT A.PARTICIPANT_KEY..." when expecting one of the following select Is
εμάς.Μάθετε περισσότερα Το κατάλαβαΟ λογαριασμός μουΑναζήτησηΧάρτεςYouTubePlayΕιδήσειςGmailDriveΗμερολόγιοGoogle+ΜετάφρασηΦωτογραφίεςΠερισσότεραΈγγραφαBloggerΕπαφέςHangoutsΑκόμη περισσότερα από την GoogleΕίσοδοςΚρυφά πεδίαΒιβλίαbooks.google.gr - Beginning Oracle PL/SQL gets you started in using the built-in language that every Oracle developer and database administrator must know. Oracle Database is chock-full of built-in application features that are free for the using, and PL/SQL is your ticket to learning about and using those features from...https://books.google.gr/books/about/Beginning_Oracle_PL_SQL.html?hl=el&id=OV8nCgAAQBAJ&utm_source=gb-gplus-shareBeginning Oracle PL/SQLΗ βιβλιοθήκη μουΒοήθειαΣύνθετη Αναζήτηση ΒιβλίωνΑποκτήστε το εκτυπωμένο βιβλίοΔεν υπάρχουν διαθέσιμα eBookApress.comΕλευθερουδάκηςΠαπασωτηρίουΕύρεση σε κάποια βιβλιοθήκηΌλοι οι πωλητές»Αγορά βιβλίων στο Google PlayΠεριηγηθείτε στο μεγαλύτερο ηλεκτρονικό βιβλιοπωλείο του κόσμου και ξεκινήστε να διαβάζετε σήμερα στον ιστό, το tablet, το τηλέφωνο ή το ereader σας.Άμεση μετάβαση στο Google Play »Beginning Oracle PL/SQLDonald BalesApress, 8 Μαΐ 2015 - 492 σελίδες 0 Κριτικέςhttps://books.google.gr/books/about/Beginning_Oracle_PL_SQL.html?hl=el&id=OV8nCgAAQBAJBeginning Oracle PL/SQL gets you started in using the built-in language that every Oracle developer and database administrator must know. Oracle Database is chock-full of bu