Tag: X++ range

SQL in X++, range in where clause

Below case is when ‘AccessFeedsFilter’ has value it should fetch that reocrds only if its empty: it should fetch all

 

while select SKUNumber, ItemId, inventDimId,LifeCycleStatusFlag,ItemName, InboundDepth, InboundHeight, InboundWeight, InboundWidth,
OutboundDepth, OutboundHeight, OutboundWeight, OutboundWidth, ActualDepth, ActualHeight, ActualWeight, ActualWidth, RetailVariantId, Description, BasePrice
from productsAndVariants
where (productsAndVariants.LifeCycleStatusFlag == ogoParameters.AccessFeedsFilter && ogoParameters.AccessFeedsFilter != “”) || (ogoParameters.AccessFeedsFilter == “” && true)