Home » SQL & PL/SQL » SQL & PL/SQL » Warning: PROCEDURE created with compilation errors. missing Select Key Word
Warning: PROCEDURE created with compilation errors. missing Select Key Word [message #334702] Thu, 17 July 2008 13:48 Go to next message
shoakat
Messages: 3
Registered: July 2008
Junior Member
CREATE OR REPLACE PROCEDURE sp_GetAuthorsCity(inauid IN VARCHAR :='', inCity IN VARCHAR :='')
IS
DECLARE insql VARCHAR;
DECLARE whereClause VARCHAR;
BEGIN
SET insql = ' SELECT AU_ID,AU_LNAME,AU_FNAME,PHONE,ADDRESS,CITY,STATE,ZIP,CONTRACT from AUTHORS '
IF (inauid ='' AND incity ='') THEN
SET whereClause =''

ELSE
IF (inauid ='' AND inCity <> '') THEN
SET whereClause = 'where City LIke ''%' + inCity + '%'''
ELSE
IF (auid <>'' AND inCity = '') THEN
SET whereClause = ' where inauid = ''' + inauid + ''''
ELSE
SET whereClause = ' where ( inauid =''' + inauid + '' ' and CITY Like '%' +inCity +'%'')'
END IF;

SET insql =insql + whereClause
EXEC insql

END sp_GetAuthorsCity;
Re: Warning: PROCEDURE created with compilation errors. missing Select Key Word [message #334706 is a reply to message #334702] Thu, 17 July 2008 13:57 Go to previous messageGo to next message
BlackSwan
Messages: 25046
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.

Please go read the following manual:
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/toc.htm

All the answers to your SYNTAX questions are in the above URL
Re: Warning: PROCEDURE created with compilation errors. missing Select Key Word [message #334714 is a reply to message #334702] Thu, 17 July 2008 14:03 Go to previous messageGo to next message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Michel Cadot wrote on Thu, 17 July 2008 20:59
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: Warning: PROCEDURE created with compilation errors. missing Select Key Word [message #334736 is a reply to message #334702] Thu, 17 July 2008 15:43 Go to previous messageGo to next message
Littlefoot
Messages: 20900
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Is this procedure supposed to be an Oracle procedure? If so, did you bother to read a manual, create a simple PL/SQL procedure before trying to successfully create such a (relatively) tricky procedure for a newbie?
Re: Warning: PROCEDURE created with compilation errors. missing Select Key Word [message #334745 is a reply to message #334736] Thu, 17 July 2008 16:07 Go to previous messageGo to next message
joy_division
Messages: 4642
Registered: February 2005
Location: East Coast USA
Senior Member
This is definitely not Oracle. Oracle doesn't give error messages like that. It's surely not Oracle syntax.
Re: Warning: PROCEDURE created with compilation errors. missing Select Key Word [message #334816 is a reply to message #334745] Fri, 18 July 2008 03:50 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
That looks like SqlServer T-Sql to me
Re: Warning: PROCEDURE created with compilation errors. missing Select Key Word [message #334823 is a reply to message #334702] Fri, 18 July 2008 04:20 Go to previous message
jyothsna1612
Messages: 68
Registered: June 2008
Member
I agree with JOY.
I didn't find any oracle sql/plsql syntax in the code given..
Previous Topic: Split the Numeric Value in Varchar
Next Topic: Trigger in Package
Goto Forum:
  


Current Time: Thu Dec 08 08:28:24 CST 2016

Total time taken to generate the page: 0.07129 seconds