选择 true 时的布尔值同时返回 true 和 false 值

boolean when true is selected bring back both true and false values

我有一个查询,其中有一个返回 1 和 0 的字段。 I want to use a Boolean parameter in my report...which when true is selected brings back all the 1's and 0's and when false is selected just brings back the 0's.

当前选择true时,它只会带回1,这是您怀疑的,但是还有一种方法可以拉动0吗?

您的 WHERE 子句应如下所示

WHERE ( FieldName = @Param OR @Param = 1)