Home » SQL & PL/SQL » SQL & PL/SQL » Prcedure created with Compilation error
Prcedure created with Compilation error [message #334703] Thu, 17 July 2008 13:50 Go to next message
shoakat
Messages: 3
Registered: July 2008
Junior Member
CREATE OR REPLACE PROCEDURE sp_GetTitles(inauid IN VARCHAR)
IS
BEGIN
SELECT AU_ID,TITLE_ID FROM TITLEAUTHOR
WHERE AU_ID = inauid
END sp_GetTitles;
Re: Prcedure created with Compilation error [message #334705 is a reply to message #334703] Thu, 17 July 2008 13:54 Go to previous messageGo to next message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
http://www.orafaq.com/forum/t/88153/0/
Please read & follow posting guidelines as stated in URL above

Error? What error? I don't see any error.
Re: Prcedure created with Compilation error [message #334707 is a reply to message #334705] Thu, 17 July 2008 13:58 Go to previous messageGo to next message
shoakat
Messages: 3
Registered: July 2008
Junior Member
it just gives this compilation error
Re: Prcedure created with Compilation error [message #334708 is a reply to message #334703] Thu, 17 July 2008 13:59 Go to previous messageGo to next message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
I think you should first read these 2 following manuals:
PL/SQL User's Guide and Reference
Application Developer's Guide - Fundamentals

And also please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter).
Use the "Preview Message" button to verify.


Regards
Michel
Re: Prcedure created with Compilation error [message #334710 is a reply to message #334707] Thu, 17 July 2008 14:00 Go to previous messageGo to next message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
shoakat wrote on Thu, 17 July 2008 20:58
it just gives this compilation error

show errors

Regards
Michel

Re: Prcedure created with Compilation error [message #334712 is a reply to message #334703] Thu, 17 July 2008 14:01 Go to previous messageGo to next message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
http://www.orafaq.com/forum/t/88153/0/
Please read & follow posting guidelines as stated in URL above

Error? What error? I don't see any error.


http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/toc.htm

I suggest you RTFM above along with the Posting Guidelines!
Re: Prcedure created with Compilation error [message #334834 is a reply to message #334712] Fri, 18 July 2008 05:13 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
I think this is Sql Server again - if it were Pl/Sql, you'd need and INTO clause after the SELECT statement.
Re: Prcedure created with Compilation error [message #334844 is a reply to message #334703] Fri, 18 July 2008 05:56 Go to previous message
jyothsna1612
Messages: 68
Registered: June 2008
Member
Hi,
If you are trying for pl/sql procedure then here is the small hint to write the procedure:
CREATE OR REPLACE PROCEDURE P_EMP
     (ENO  IN EMP.EMPNO%TYPE)
IS
  V_SAL  EMP.SAL%TYPE;
BEGIN
  SELECT SAL
  INTO   V_SAL
  FROM   EMP
  WHERE  EMPNO = ENO;
  
  DBMS_OUTPUT.PUT_LINE(V_SAL);
END;

Procedure created.

SQL> exec p_emp(7566)
2975

PL/SQL procedure successfully completed.


Thanks

Previous Topic: Trigger in Package
Next Topic: issue with db links ..
Goto Forum:
  


Current Time: Fri Dec 09 17:47:44 CST 2016

Total time taken to generate the page: 0.44245 seconds