搞了半天你用的是PARADOX:它仅支持以下东东:
Arithmetic +, ? *, /
Comparison <, >, =, <>, IS NULL, IS NOTNULL, >=, =<
Logical AND, OR, NOT
String concatenation ||
String pattern match LIKE
SUM(), for totaling all numeric values in a column
AVG(), for averaging all non-NULL numeric values in a column
MIN(), for determining the minimum value in a column
MAX(), for determining the maximum value in a column
COUNT(), for counting the number of values in a column that match specified criteria
COUNT(*), for counting non-NULL numeric values in a column
UPPER(), to force a string to uppercase
LOWER(), to force a string to lowercase
TRIM(), to remove repetitions of a specified character from the left, right, or both sides of a string
SUBSTRING() to create a substring from a string
EXTRACT() function for isolating a single numeric field from a date/time field on retrieval using the following syntax:
EXTRACT (extract_field FROM field_name)
所以说你的问题只能通过其它手段来完成了非SQL所能