BETWEEN FUNCTION WITH IN A DECODE FUNTION IN A CURSOR
Uday_NSep 6 2010 — edited Sep 6 2010The following below is my query..I have to get the hours,min and seconds from a 'yyyy-mm-dd-24hh.mi.ss' value and check if the time is between 12 am to 6 am , then write it with one value else write an another value..I am trying to use 'BETWEEN' function in decode function but i am getting error.....Can we use BETWEEN function with in decode function or is there any other way
set serveroutput on
declare
cursor cur_dte is select lst_upd_date from EMPLOYESS ;
begin
for i in cur_dte loop
DECODE (substr(trim(i.lst_upd_date),12)) ,between '00.00.00.0000' and '06.00.00.00.0000' ,101,102);
dbms_output.put_line(i.lst_upd_date);
end loop;
end