-
I have a stored procedure that accepts a date parameter and I have to check for a year they will enter 01/01/2000 and I have to check if the date is between 01/01/2000/12/31/2000 how can I create a variable that if they enter 01/01/2001 the it will create the value for the variable 12/31/2001 is the calculation that can be done to add to the date.
example
e_date in date%type,
v_date in varchar2
as
begin
open cur1 for
select
type,
date,
id
from t1, t2
where t1.date between e_date and v_date
-
Although parts of your question are not quit clear,
I asume you can use the funtion trunc(sysdate,'yyyy').
So :
where trunc(t1.date,'yyyy') = trunc(e_date,'yyyy')
Regards
Ben de Boer
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|