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

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -