Hi,
First of all you here after post the requirement in the Forums --> 2005 or 2000 ---> development or in the TSQL as required
OK, Try this
select ItemCode,
ItemName,
OnHand,
Qty_Sales,
Qty_Sales_Month_1,
Days,
[Total days],
TURNOVER_IN_MONTH,
TURNOVER_DAYS from (
SELECT TOP 100 PERCENT ItemCode,
ItemName,
OnHand,
/*YOUR STATEMENT*/
OR T0.ONHAND > 0 ORDER BY 1
) AS X
from this you may draft your requirement like
select ItemCode [Item Code],
OnHand [Stock],
Qty_Sales [Qty Sales],
Qty_Sales_Month_1 [Qty Sales_Last],
([Total days]- Days) Days,
[Total days],
(case when TURNOVER_IN_MONTH > 0 then 'Sales' else 'No Sales'end0 [TURNOVER_IN_MONTH ],
TURNOVER_DAYS
from (
SELECT TOP 100 PERCENT ItemCode,
ItemName,
OnHand,
/*YOUR STATEMENT*/
OR T0.ONHAND > 0 ORDER BY 1
) AS X
ARUN SAS