problem using CURSOR with BETWEEN clause.. [message #18893] |
Wed, 20 February 2002 07:25  |
Sabrina
Messages: 76 Registered: February 2002
|
Member |
|
|
PLEASE TELL ME WHAT AM I DOING WRONG!
My procedure
procedure ListCISID
(txtdeptime1 IN d1.tbl_claimshistory.deposittime%TYPE,
txtdeptime2 IN d1.tbl_claimshistory.deposittime%TYPE)
is
cursor cuCISID(txtdeptime1 IN d1.tbl_claimshistory.deposittime%TYPE,
txtdeptime2 IN d1.tbl_claimshistory.deposittime%TYPE)
is
select CISID,count(*) TotalCount,SUM(totalamount/100) TotalAmount
from tbl_claimshistory
where deposittime
between to_date('txtdeptime1','DD-MON-YYYY') AND to_date('txtdeptime2','DD-MON-YYYY')
GROUP BY CISID
ORDER BY CISID;
begin
for crCISID in cuCISID(upper(txtdeptime1),upper(txtdeptime2)) loop
DO SOMETHING
end loop;
end ListCISID;
|
|
|
|
|
Re: problem using CURSOR with BETWEEN clause.. [message #18899 is a reply to message #18895] |
Wed, 20 February 2002 10:32  |
Sabrina
Messages: 76 Registered: February 2002
|
Member |
|
|
My datatype is timestamp.
Now, i am using a web page:
so my input field will be DD-MON-YYYY...
So i want to convert this date to match up the timestamp in the database.
i also tried
to_timestamp('date','DD-MON-YYYY HH:MI:SS:FF')
NOTHING SEEMS TO WORK
Any help will be very appreciated.
|
|
|