Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Database > Oracle
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Oracle General Oracle database discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Oracle section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 18th, 2007, 01:20 AM
Registered User
 
Join Date: Aug 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error while compiling PL/SQL function in 10g

I've written PL/SQL function wherein i'm retrieving contact details. Here is my PL/SQL function:
CREATE OR REPLACE FUNCTION getOrderContact(contactID IN number)
    RETURN SYS_REFCURSOR
AS
     st_cursor SYS_REFCURSOR;
BEGIN
     OPEN st_cursor FOR
     SELECT c.NAME, c.EMAIL, c.STREETADDRESS1, c.STREETADDRESS2, c.CITY, c.PROVINCE, c.COUNTRY, c.POSTALCODE
     FROM orders o, contact c
     WHERE c.contactID = contactID
     AND c.contactID = o.contactID
RETURN st_cursor;
END;

I'm getting following error:
-------------------------------------
ERROR at line 7: PL/SQL: SQL Statement ignored

5. BEGIN
6. OPEN st_cursor FOR
7. SELECT c.NAME, c.EMAIL, c.STREETADDRESS1, c.STREETADDRESS2, c.CITY, c.PROVINCE, c.COUNTRY, c.POSTALCODE
8. FROM orders o, contact c
9. WHERE c.contactID = contactID
------------------------------------------

Pls help me to overcome this issue.

Thanks in Advance
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PL/SQL Function returning age code_lover Oracle 2 April 16th, 2007 12:37 PM
PL/SQL Somesh ASP.NET 1.0 and 1.1 Basics 7 December 15th, 2006 05:49 PM
PL/SQL cooldude87801 Oracle 1 March 3rd, 2005 10:54 AM
PL/SQL help carly_1 Oracle 1 October 19th, 2003 08:14 PM
PL/SQL help Blue Oracle 0 August 12th, 2003 02:54 PM



All times are GMT -4. The time now is 03:35 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.