oracle - Issue with comparision of day in PL/SQL -
i working on pl/sql. meanwhile, required compare whether date in table friday or not. applied below code it's still executing 'else' part of program. can please tell me way?
begin select dt dat ticket_booking id=1; dy := to_char(dat, 'day'); if dy = to_char('friday') dbms_output.put_line(dy); else dbms_output.put_line('didnt print'||dy); end if; end;
instead of day
, need use fmday
.
begin select dt dat ticket_booking id=1; dy := to_char(dat, 'fmday'); if dy = to_char('friday') dbms_output.put_line(dy); else dbms_output.put_line('didnt print'||dy); end if; end;
Comments
Post a Comment