Bah!
I am in a good mood today I guess.
I'll write the whole thing for you.
You need to send in the two dates and you also need variables that will be coming out to be declared in the execute statement.
Look below:
Code:
17:55:55 kod:platform> CREATE OR REPLACE PROCEDURE SP_GET_CUST (
17:56:37 2 iCUST_ID IN VARCHAR2,
17:56:37 3 vLNAME_TXT OUT VARCHAR2,
17:56:37 4 vFNAME_TXT OUT VARCHAR2
17:56:37 5 )
17:56:37 6 AS
17:56:37 7
17:56:37 8 BEGIN
17:56:37 9
17:56:37 10 SELECT
17:56:37 11 LNAME_TXT,
17:56:37 12 FNAME_TXT
17:56:37 13 INTO
17:56:37 14 vLNAME_TXT,
17:56:37 15 vFNAME_TXT
17:56:37 16 FROM
17:56:37 17 customer
17:56:37 18 WHERE
17:56:37 19 cust_id = iCUST_ID;
17:56:37 20
17:56:37 21 END SP_GET_CUST;
17:56:37 22 /
Procedure created.
Elapsed: 00:00:00.01
17:56:37 kod:platform> variable P1 varchar2(20);
17:56:46 kod:platform> variable P2 varchar2(20);
17:56:46 kod:platform> variable P3 varchar2(20);
17:56:46 kod:platform>
17:56:46 kod:platform> execute :P1:='10001'
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.00
17:56:46 kod:platform> execute SP_GET_CUST(:P1,:P2,:P3)
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.00
17:56:46 kod:platform>
17:56:46 kod:platform> select :P2, :P3 from dual;
:P2 :P3
-------------------------------- --------------------------------
A B
1 row selected.
Elapsed: 00:00:00.00
17:57:03 kod:platform>
that should be enough of an example for you to write anything you want.
If your select statement is getting back more than one row then you need to create a RETSET.