Issue when comparing result of to_char(myDate, 'DAY') to a string

后端 未结 2 1984
耶瑟儿~
耶瑟儿~ 2020-12-03 22:39

I have been trying to find what the issue might be but I am just out of luck and don\'t understand this problem at all.I have the following code:

CREATE OR R         


        
2条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-03 23:11

    If you want to be really robust about this then you ought to force the NLS setting to English and apply the "fill mode" format model FM for trimming leading and trailing spaces.

    If To_Char(DateC,'fmDAY', 'nls_date_language=english') = 'FRIDAY'
    Then ...
    

提交回复
热议问题