Firebird从表中选择字段,其中字段= current_date [英] Firebird Select Field From Table where Field = current_date
本文介绍了Firebird从表中选择字段,其中字段= current_date的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个简单但又无法解决的问题
I have a simply but fror me unsolveable question
我有此请求:
Firebird从表中选择字段,其中Field =当前日期
Firebird Select Field From Table where Field = current_date
问题在于此字段是一个文本字段,其保存日期的格式为:25.04.2014
The problem is that this field is a text field an holds date in this format: 25.04.2014
如果它是当前日期,我该如何转换为该问题有效的
How can i convert it that this questions works if it is the current date.
推荐答案
SELECT fields FROM table WHERE field=
substring(100+extract(day from current_date) from 2 for 2)
|| '.' ||
substring(100+extract(month from current_date) from 2 for 2)
|| '.' ||
extract(year from current_date)
这篇关于Firebird从表中选择字段,其中字段= current_date的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文