Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8852351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:22:39+00:00 2026-06-14T13:22:39+00:00

am creating a package in pl/sql . with in this i declared the ref

  • 0

am creating a package in pl/sql . with in this i declared the ref cursor . With in procedure am using select statement with multiple column name . but am not able to get the result.
here i attached my code. Help me to correct the error. Am new to pl/sql

code

CREATE OR REPLACE PACKAGE types AS 
  TYPE cursor_type IS REF CURSOR;
END Types; 
/

CREATE OR REPLACE
PROCEDURE get_CDR_rs (p_no    IN  zkv.FLD_callingPartyNumber%TYPE,
                  CDR_recordset OUT SYS_REFCURSOR) AS 
BEGIN 
 OPEN CDR_recordset FOR
SELECT  FLD_callingPartyNumber,
       FLD_dateTimeConnect

FROM   CISCOCUIC_TBL
WHERE  FLD_callingPartyNumber= p_no
ORDER BY FLD_callingPartyNumber,;
END get_CDR_rs;
/



SET SERVEROUTPUT ON SIZE 1000000
DECLARE
  l_cursor  SYS_REFCURSOR;
  l_callingPartyNumber   zkv.FLD_callingPartyNumber%TYPE;
  l_dateTimeConnect  zkv.FLD_dateTimeConnect%TYPE;
BEGIN

LOOP 
FETCH l_cursor
INTO  l_callingPartyNumber, l_dateTimeConnect;
EXIT WHEN l_cursor%NOTFOUND;

END LOOP;
CLOSE l_cursor;
END;
/


Error

9/41    PL/SQL: ORA-00936: missing expression
5/5     PL/SQL: SQL Statement ignored
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T13:22:41+00:00Added an answer on June 14, 2026 at 1:22 pm

    First thing is there is a syntax error in the procedure. It should be

    CREATE OR REPLACE
    PROCEDURE get_CDR_rs (p_no    IN  zkv.FLD_callingPartyNumber%TYPE,
                      CDR_recordset OUT SYS_REFCURSOR) AS 
    BEGIN 
     OPEN CDR_recordset FOR
    SELECT  FLD_callingPartyNumber,
           FLD_dateTimeConnect
    
    FROM   CISCOCUIC_TBL
    WHERE  FLD_callingPartyNumber= p_no
    ORDER BY FLD_callingPartyNumber; -- there was a comma which is not required or you    
    --   missed a column
    END get_CDR_rs;
    /
    

    Secondly where is get_CDR_rs being called to retrieve the results?

    Thirdly why do you need the following? because you are using sys_refcursor

    CREATE OR REPLACE PACKAGE types AS 
      TYPE cursor_type IS REF CURSOR;
    END Types; 
    /
    

    If you would like to see the results of your procedure which returns sys_refcursor, do as follows

    variable rset refcursor;
    
    DECLARE
      p_no  zkv.FLD_callingPartyNumber%TYPE;
    BEGIN
      p_no := '123';
      get_CDR_rs (p_no, :rset);  
    END;
    /
    
    print rset
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating an install package using InnoSetup and installing SQL Server 2005 Express. Here's
In SQL Server, I have this query SELECT DISTINCT City FROM Person.Address But this
I am creating package using cmake I am having following structure bin/ bin1 lib/
Folks, We have been using OpenXml APIs found in System.IO.Packaging for creating a package
I am creating an azure package using Visual Studio (right click on azure project
I'm creating a Visual Studio 2010 extension using a Package template, not an Add-in.
Given this code : package db; import java.io.*; import java.sql.*; public class Connect {
This is my first attempt at creating a package, so I must be missing
I am creating a SQL Server integration package that requires some VBScript. Basically, every
I'm creating an msi package with WiX 3.5 (VS2010) and everything is fine, except

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.