Mysql 我有一个Sql语句出错了

Mysql 我有一个Sql语句出错了,mysql,Mysql,下面的声明崩溃了,我不明白为什么。这是错误的500数量,说明我只能引用当前数据集中的字段(我相信我是)!!!! 有人能帮忙吗 谢谢 =IIF( ( Fields!Quantity.Value>=500, (Fields!QTY500_.Value, "SellingPrice"), IIF( Fields!Quantity.Value<=499 AND Fields!Quantity.Value >=100,

下面的声明崩溃了,我不明白为什么。这是错误的500数量,说明我只能引用当前数据集中的字段(我相信我是)!!!! 有人能帮忙吗

谢谢

=IIF(
    ( Fields!Quantity.Value>=500,
      (Fields!QTY500_.Value, "SellingPrice"),
      IIF( 
          Fields!Quantity.Value<=499 AND Fields!Quantity.Value >=100,
          (Fields!QTY100_499.Value, "SellingPrice"),
          IIF(
              Fields!Quantity.Value<=99) AND (Fields!Quantity.Value)>=10,
              (Fields!QTY10_99.Value, "SellingPrice"),
              (Fields!QTY1_9.Value, "SellingPrice")
          )
      )
    )
)
=IIF(
(字段!数量.值>=500,
(字段!QTY500的价值,“销售价格”),
IIF(
字段!数量.值=100,
(字段!QTY100_499.Value,“销售价格”),
IIF(
字段!数量。值=10,
(字段!QTY10_99.Value,“销售价格”),
(字段!QTY1_9.Value,“销售价格”)
)
)
)
)
IIF(字段!数量.值)问题出在这里
应该是IIF(Fields!Quantity.Value请发布完整的查询。当我们看不到完整的代码时,很难回答。可能是我错了,但此查询看起来像access,而不是mysql。这是完整的代码。它是sql,是在microsoft visual studio中编写的。您缺少parens,我尽我所能为您更新了它,但很明显。。。