關於搜尋含運算符號

[复制链接]
查看11 | 回复4 | 2009-1-9 16:16:37 | 显示全部楼层 |阅读模式
由於需要搜尋物料說明說含「+」的物料,但sap似乎不認得「+」,導致我在搜尋鍵入「+*」時,沒有搜尋出含「+」的物料,是否需要加入什麼特殊的前置字元才能讓「+」生效。
回复

使用道具 举报

千问 | 2009-1-9 16:16:37 | 显示全部楼层
用CS
data l_str type string.
l_str = 'dfs+dfsdf'.
if l_str cs '+'.
write 'true'.
else.
write 'false'.
endif.
回复

使用道具 举报

千问 | 2009-1-9 16:16:37 | 显示全部楼层
+在SAP中也是通配符,用SAP的搜索+时SAP会匹配'+'号所在位置的所有字符。当然这里面也包含'+',不过如果要单纯去搜索'+'符号好像什么好方法,应该尽量避免使用'+'和'*'号
回复

使用道具 举报

千问 | 2009-1-9 16:16:37 | 显示全部楼层
Wildcard Searches
You can search for exact strings or you can perform a wildcard search. Use the * (asterisk) as a wildcard for a string of characters. For example, the search criteria a*le would find both able and apple . Use the + (plus sign) as a wildcard for any one character. The search criteria a+le would fine able but not apple .
Use the # (pound sign) as an escape symbol. With this symbol you can search for the special characters * (asterisk), + (plus sign), or # (pound sign). For example, to locate the string 1+2 you would specify a search string of 1#+2 .
也就是用#囉。
回复

使用道具 举报

千问 | 2009-1-9 16:16:37 | 显示全部楼层
原帖由 pocan0408 于 2009-5-6 13:56 发表
Wildcard Searches
You can search for exact strings or you can perform a wildcard search. Use the * (asterisk) as a wildcard for a string of characters. For example, the search criteria a*le would find both able and apple . Use the + (plus sign) as a wildcard for any one character. The search criteria a+le would fine able but not apple .
Use the # (pound sign) as an escape symbol. With this symbol you can search for the special characters * (asterisk), + (plus sign), or # (pound sign). For example, to locate the string 1+2 you would specify a search string of 1#+2 .
也就是用#囉。

刚刚也在老白的博客中看以,可以用'#'进行转义:
http://blog.chinaunix.net/u1/40527/showart_1341455.html
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行