Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > Oracle
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 18th, 2007, 01:20 AM
Registered User
 
Join Date: Aug 2007
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





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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.