Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个问题,我想在文本中包含 sysdate,目前我的 Where 语句如下所示:
where optxt_text like '%Mahnstufe 2 29.06.2016%' and (reverse(rpad(reverse(optxt_belnr),3))) in ('KAG','KRE','KSR') ;
有没有办法用系统日期替换“29.06.2016”?
对不起,我的英语不好。
我修好了它
解决方案是:
LIKE '%... '||to_char(sysdate,'DD.MM.YYYY')||'%'
这应该可以解决问题:
where optxt_text like '%Mahnstufe 2 '+CONVERT(nchar, getdate(), 104)+'%'