"select im_item_id from "
+ scheama
+ "TBL_IMAGE tb where tb.im_polno=right('"
+ paramValue
+ "',8) and im_org=left('"+paramValue+"',1) and im_branch_code=substr('"+paramValue+"',2,2) and tb.im_item_id not in (select dfs.mainindex from "
+ scheama + "DFS_RESOURCEOBJECTS dfs)";tb.im_polno=right('"+ paramValue+ "',8) and im_org=left('"+paramValue+"',1) 这个 right 和left 什么意思啊
+ scheama
+ "TBL_IMAGE tb where tb.im_polno=right('"
+ paramValue
+ "',8) and im_org=left('"+paramValue+"',1) and im_branch_code=substr('"+paramValue+"',2,2) and tb.im_item_id not in (select dfs.mainindex from "
+ scheama + "DFS_RESOURCEOBJECTS dfs)";tb.im_polno=right('"+ paramValue+ "',8) and im_org=left('"+paramValue+"',1) 这个 right 和left 什么意思啊
你这里参数是取右边8个字和左边1个字
left从左边取
RIGHT ( character_expression , integer_expression )
参数
--------------------------------------------------------------------------------character_expression
字符或二进制数据表达式。character_expression 可以是常量、变量或列。character_expression 可以是任何能够隐式转换为 varchar 或 nvarchar 的数据类型,但 text 或 ntext 除外。否则,请使用 CAST 函数对 character_expression 进行显式转换。integer_expression
正整数,指定 character_expression 将返回的字符数。如果 integer_expression 为负,则将返回错误。如果 integer_expression 的数据类型为 bigint 且包含一个较大值,character_expression 必须是大型数据类型,如 varchar(max)。返回类型
--------------------------------------------------------------------------------当 character_expression 为非 Unicode 字符数据类型时,返回 varchar。当 character_expression 为 Unicode 字符数据类型时,返回 nvarchar。