2

我有一个包含以下内容的查询:

Field1: Replace([Field1],"ü",", ")

如果 Field1 中有某些内容,这将非常有用。Field1 中的数据通常看起来像 1ü2、0ü0、1ü1 等。但是,如果一条记录在 Field1 中没有任何内容,则会出现以下错误:

This expression is typed incorrectly, or it is too complex to be evaluated. For example, a numeric expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables.

如果我将字段更改为Field1: Field1查询运行没有错误。有没有办法处理 Field1 为空白的可能性?

谢谢!

4

1 回答 1

4

您需要处理Field1包含null值的可能性。

函数的第一个参数Replace不能包含null值,因此您使用该nz函数将所有null值转换为其他值,在这种情况下它将是""

Field1: Replace(nz([Field1],""),"ü",", ")
于 2013-08-19T14:01:00.523 回答