I tried to find what might be the problem, but I was just out of luck and did not understand the problem at all. I have the following code:
CREATE OR REPLACE FUNCTION ckeckDay(dateC in date) RETURN VARCHAR IS day VARCHAR(15); checkFriday VARCHAR(1); BEGIN checkFriday := 'N'; day := to_char(dateC, 'DAY'); IF day = 'FRIDAY' THEN checkFriday := 'Y'; END IF; RETURN day; END; /
dateC set on Friday (he even checked it by returning day instead of day , and it returns Friday.) However, the IF never evaluates to true, even if day is really Friday. Any ideas how to get around this. thanks
source share