Home » SQL & PL/SQL » SQL & PL/SQL » problem using CURSOR with BETWEEN clause..
problem using CURSOR with BETWEEN clause.. [message #18893] Wed, 20 February 2002 07:25 Go to next message
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 #18895 is a reply to message #18893] Wed, 20 February 2002 08:05 Go to previous messageGo to next message
Suresh Vemulapalli
Messages: 624
Registered: August 2000
Senior Member
what is datatype of two parameters?
DATATYPE [message #18898 is a reply to message #18895] Wed, 20 February 2002 10:07 Go to previous messageGo to next message
Sabrina
Messages: 76
Registered: February 2002
Member
MY DATATYPE IS TIMESTAMP AND I WANT TO CHANGE IT TO A DATE..
Re: problem using CURSOR with BETWEEN clause.. [message #18899 is a reply to message #18895] Wed, 20 February 2002 10:32 Go to previous message
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.
Previous Topic: insert sysdate with specific time
Next Topic: Re: sql query
Goto Forum:
  


Current Time: Thu Apr 25 07:56:20 CDT 2024