ADO Recordset 筛选器比较两个字段
ADO Recordset filter comparing two fields
如何通过比较两个字段来过滤记录集?
对于具有 n 个字段(Field1、Field2、...、Fieldn)的给定 ADO 记录集
我曾经根据值过滤字段:
rs.Filter = "Field1 = 'something'"
但是我需要做的是这样的:
rs.Filter = "Field1 = Field2"
这可能吗?
The criteria string is made up of clauses in the form FieldName-Operator-Value
Value is the value with which you will compare the field values (for example, 'Smith', #8/24/95#, 12.345, or .00). Use single quotes with strings and pound signs (#) with dates. For numbers, you can use decimal points, dollar signs, and scientific notation. If Operator is LIKE, Value can use wildcards. Only the asterisk (*) and percent sign (%) wild cards are allowed, and they must be the last character in the string. Value cannot be null.
这表明不支持相互比较字段。 Value
必须是文字。
如何通过比较两个字段来过滤记录集?
对于具有 n 个字段(Field1、Field2、...、Fieldn)的给定 ADO 记录集
我曾经根据值过滤字段:
rs.Filter = "Field1 = 'something'"
但是我需要做的是这样的:
rs.Filter = "Field1 = Field2"
这可能吗?
The criteria string is made up of clauses in the form FieldName-Operator-Value
Value is the value with which you will compare the field values (for example, 'Smith', #8/24/95#, 12.345, or .00). Use single quotes with strings and pound signs (#) with dates. For numbers, you can use decimal points, dollar signs, and scientific notation. If Operator is LIKE, Value can use wildcards. Only the asterisk (*) and percent sign (%) wild cards are allowed, and they must be the last character in the string. Value cannot be null.
这表明不支持相互比较字段。 Value
必须是文字。