AND (MDX)

在兩個數值運算式上執行邏輯結合。

語法

Expression1 AND Expression2

參數

Expression1

傳回數值的有效多維度運算式 (MDX) 運算式。

Expression2

傳回數值的有效 MDX 運算式。

傳回值

如果兩個參數都評估為 true,布林值就會傳回 true;否則,會傳回 false

備註

運算子執行邏輯結合之前,AND 運算子會將兩個運算式視為布林值 (零 (0) 作為 false;否則為 true)。下表說明 AND 運算子如何執行邏輯集合。

Expression1 Expression2 傳回值

true

true

true

true

false

false

false

true

false

false

false

false

範例

-- This query returns the gross profit margin (GPM)
-- for clothing sales where the GPM is between 20% and 30%.
With Member [Measures].[LowGPM] as
  IIF(
      [Measures].[Gross Profit Margin %] <= .3 AND 
      [Measures].[Gross Profit Margin %] >= .2,
      [Measures].[Gross Profit Margin %],
      null)
SELECT NON EMPTY
    [Sales Territory].[Sales Territory Country].Members ON 0,
    [Product].[Category].[Clothing] ON 1
FROM
    [Adventure Works]
WHERE
    ([Measures].[LowGPM])

請參閱

參考

MDX 運算子參考 (MDX)

說明及資訊

取得 SQL Server 2005 協助