M
muhammadanzar
Guest
hi
select ProductId,ProductName,batch, convert(varchar(10),dbo.ProductShopStock.Expairy,101) as Expairy,
case
when datediff(mm,getdate(), dbo.ProductShopStock.Expairy)<0 then 'Expired'
when datediff(mm,getdate(), dbo.ProductShopStock.Expairy)<6 then 'Near To Expired'
else 'Ready To Sale'
END AS Status
from dbo.ProductShopStock
I want Status column not show "Ready To Sale" Records. How can i record selection and use where clause on status column. status column not exist in my table. can some one guide me.
MUHAMMAD ANZAR E-mail : muhammadanzar@hotmail.com Mobile # :0092-3215096959
Continue reading...
select ProductId,ProductName,batch, convert(varchar(10),dbo.ProductShopStock.Expairy,101) as Expairy,
case
when datediff(mm,getdate(), dbo.ProductShopStock.Expairy)<0 then 'Expired'
when datediff(mm,getdate(), dbo.ProductShopStock.Expairy)<6 then 'Near To Expired'
else 'Ready To Sale'
END AS Status
from dbo.ProductShopStock
I want Status column not show "Ready To Sale" Records. How can i record selection and use where clause on status column. status column not exist in my table. can some one guide me.
MUHAMMAD ANZAR E-mail : muhammadanzar@hotmail.com Mobile # :0092-3215096959
Continue reading...