Transformation language 方法 IN, MAX
2012-11-23 14:24
399 查看
IN()
Matchesinputdatatoalistofvalues.默认情况下,匹配时大小写敏感。
语法:IN( valueToSearch,value1,[value2,...,valueN,]CaseFlag)
查找的值valueToSearch可以是String,date或者numericvalue。CaseFlag必须是整数,当为0或者空时,大小写不敏感,为其他整数时,大小写敏感。
返回值:
TRUE(1),查找值存在于值列表中
FALSE(0),查找值不在值列表中
NULL,输入值为空时
例子:
IN(ITEM_NAME,‘ChiselPointKnife’,‘MediumTitaniumKnife’,‘SafetyKnife’,0)
ITEM_NAME | 返回值 |
---|---|
StabilizingVest | 0(FALSE) |
Safetyknife | 1(TRUE) |
MediumTitaniumknife | 1(TRUE) |
NULL |
Returnsthelatestdate, thelargestnumericvalueorthehigheststringvalue withinaportorgroup.Youcanapplyafiltertolimittherowsinthesearch.YoucannestonlyoneotheraggregatefunctionwithinMAX.
Note:TheMAXfunctionusesthesamesortorderthattheSortertransformationuses.However,theMAXfunctioniscasesensitive,andtheSortertransformationmaynotbecasesensitive.
语法:
MAX(date/numeric_value/string[,filter_condition])
过滤条件是可选的,过滤条件必须是数字值或者等于TRUE,FALSE,NULL。
当通过的所有值为空,或者是过滤条件为假或者空时,返回值是NULL。
GroupBy:
Max函数基于在transformation中定义的groupbyport分组,一组一个返回值,如果没有定义groupbyport,则将所有值看成一组,返回一个值。
例子:
返回flashlights的最高价格:
MAX(PRICE,ITEM_NAME='Flashlight')
ITEM_NAME | PRICE |
---|---|
Flashlight | 10.00 |
RegulatorSystem | 360.00 |
Flashlight | 55.00 |
DivingHood | 79.00 |
HalogenFlashlight | 162.00 |
Flashlight | 85.00 |
Flashlight | NULL |
返回值:85.00 |
相关文章推荐
- /usr/include/linux/netfilter.h: 错误:‘in’的类型不完全,netfilter_ipv4.h:53: ‘INT_MIN’‘INT_MAX’未声明解决方法
- ORA-01089 immediate shutdown in progress - no operations are permitted 解决方法
- gdb 调试中No symbol “***” in current context解决方法
- mysql中错误:1093-You can’t specify target table for update in FROM clause的解决方法
- Oracle dbca Exception in thread “main” 解决方法
- SQL Server中TEXT/NTEXT字段内容替换方法总结(SQL 2005及以上建议使用VARCHAR(MAX)/NVARCHAR(MAX)代替)
- ibatis(sqlmap)中使用in语句的方法
- WordPress Import 上传的文件尺寸超过php.ini中定义的upload_max_filesize值-->解决方法。
- 让IE6支持min-width和max-width的方法(JS实现) + (CSS实现)
- JavaScript实现in-place思想的快速排序方法
- dos中for in后面执行多个命令的方法
- display:inline-block在ie6,7下无法识别解决方法
- sql 查询 in里的个数超过1000 实用方法
- 关于DataAdapter 的int Fill(int startRecord, int maxRecords, params DataTable[] dataTables)方法
- 2017 Wuhan University Programming Contest (Online Round) Lost in WHU 矩阵快速幂 一个无向图,求从1出发到达n最多经过T条边的方法数,边可以重复经过,到达n之后不可以再离开。
- python for line in sys.stdin解析文件调用方法
- MyEclipse:Address already in use 解决方法
- 问题-Delphi7中JSON遍历节点不支持使用IN处理方法?
- Eclipse添加maven之后报错 Eclipse is running in a JRE, but a JDK is required 解决方法
- InCallScreen.java/enableTouchLock(boolen enable)方法分析