troubleshooting Question

Procedure syntax

Avatar of jknj72
jknj72 asked on
Oracle DatabaseSQL
5 Comments1 Solution188 ViewsLast Modified:
I have a package with a procedure that I am trying to call from my ASP.NET application. I think my problem is with the Dates im passing.
Here is my SQL Developer code.

create or replace package body spectrum_cribeast as

procedure rcgetspectrumdata(startdt in DATE, enddt in DATE,  v_userid in varchar2, rcdata out refcursor) as
NEWSTARTDATE date := TRUNC(startdt);
NEWENDDATE date := TRUNC(enddt);


    OPEN rcdata FOR    
    Select * from vwinspectioninfo Where INSPECTION_DT between TO_DATE(NEWSTARTDATE) and TO_DATE(NEWENDDATE) and INSPECTOR = v_userid;

  end rcgetspectrumdata;

end spectrum_cribeast;

My dates im passing in are in mm/dd/yyyy format and I can see in my Oracle table that the format is 01-JAN-17 format. How can I get the correct format to work so I can return a ref_cursor and get that data to my front end?  

Any help would be very appreciative
Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros