Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/fortran/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Where clause BO宇宙设计师-在哪里工作一年_Where Clause_Business Objects_Universe - Fatal编程技术网

Where clause BO宇宙设计师-在哪里工作一年

Where clause BO宇宙设计师-在哪里工作一年,where-clause,business-objects,universe,Where Clause,Business Objects,Universe,我正在尝试在Business Objects Universe Designer中运行查询,需要有关“Where”子句的帮助 我想搜索从当前年份开始少于或等于3年的所有4位数年份(DB列位于YYYY)的记录。因此,如果这一年是2014年,我想搜索每一个年份小于或等于2011年的记录 以下是我当前的where条款: dbo.DB_TABLE.CATEGORY = 'Actual' and dbo.DB_TABLE.YR <= (convert (SMALLDATETIME, {fn CURD

我正在尝试在Business Objects Universe Designer中运行查询,需要有关“Where”子句的帮助

我想搜索从当前年份开始少于或等于3年的所有4位数年份(DB列位于
YYYY
)的记录。因此,如果这一年是2014年,我想搜索每一个年份小于或等于2011年的记录

以下是我当前的where条款:

dbo.DB_TABLE.CATEGORY = 'Actual' and dbo.DB_TABLE.YR <= (convert (SMALLDATETIME, {fn CURDATE()})-3)

dbo.DB_TABLE.CATEGORY='Actual'和dbo.DB_TABLE.YR因为
YR
只是一个数字,所以您只需要从当前日期提取年份:

dbo.DB_TABLE.YR <= datepart(year,{fn curdate()})-3
dbo.DB\u TABLE.YR