简体   繁体   English

BIRT数据集查询的字符串大于日期范围

[英]BIRT Data Set Query for greater than date range from string

SELECT CRM.CUSTOMERS WITH LAST.INVOICE.DATE > 12/31/2010 选择具有最后发票日期的客户关系管理客户> 2010年12月31日

The LAST.INVOICE.DATE column is coming in as a string, so I made a computed column that converted it into a date, which worked fine. LAST.INVOICE.DATE列是作为字符串输入的,因此我创建了一个计算列,将其转换为日期,效果很好。 Based on that, I tried a fresh query pulling from the new re-formatted DATE column which looked like this: 基于此,我尝试了一个新查询,该查询是从新的经过重新格式化的DATE列中提取的,如下所示:

SELECT CRM.CUSTOMERS WITH DATE > 2010-12-31 选择日期的CRM。客户> 2010-12-31

I also tried: 我也尝试过:

SELECT CRM.CUSTOMERS WITH DATE > "2010-12-31" 选择日期为CRM.CUSTOMERS的客户>“ 2010-12-31”

Both previews are blank. 两个预览都为空白。

I also tried to filter the computed DATE column for > 2010-12-31 and the preview generates everything in the column regardless of date. 我还尝试过滤> 2010-12-31的计算出的DATE列,并且预览生成该列中的所有内容,而与日期无关。

I'm sure I'm being an idiot, any help is appreciated. 我确定我是个白痴,对您的帮助表示赞赏。

Before 之前

SELECT CRM.CUSTOMERS WITH DATE > "2010-12-31"

After

SELECT CRM.CUSTOMERS WITH DATE > to_date("2010-12-31", 'MM-DD-YYYY')

You could try using single quotes 您可以尝试使用单引号

SELECT CRM.CUSTOMERS WITH DATE > '2010-12-31'

If that doesn't work you need to make sure you have the correct date format. 如果这样不起作用,则需要确保您使用正确的日期格式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM