|
|
沙发

楼主 |
发表于 2008-10-27 18:28:53
|
只看该作者
Re: 请问where b=*'smi'的筛选规则,谢谢
Sounds-like Operator
The sounds-like ( =*) operator selects observations that contain a spelling variation of a specified word or words. The operator uses the Soundex algorithm to compare the variable value and the operand. For more information, see the SOUNDEX function in SAS Language Reference: Dictionary.
Note: Note that the SOUNDEX algorithm is English-biased, and is less useful for languages other than English.
Although the sounds-like operator is useful, it does not always select all possible values. For example, consider that you want to select observations from the following list of names that sound like Smith:
Schmitt
Smith
Smithson
Smitt
Smythe
The following WHERE expression selects all the names from this list except Schmitt and Smithson:
where lastname=* 'Smith';
You can combine the NOT logical operator with the sounds-like operator to select values that do not contain a spelling variation of a specified word or words, such as:
where lastname not =* 'Smith';
Note: The sounds-like operator cannot be optimized with an index. |
|