
-- CFAMX1299 Food donation FMV import

select EntityID, StoreNumber, * from tbEntity with(nolock)
where EntityID = 588

select top 100 * from tbSalesItem with(nolock)
where Description like '%DiscMeal%'

select * from tbSalesItem with(nolock)
where ItemCode in ('300204','700053','160048','160044')

select * from tbSalesItem with(nolock)
where SalesItemID in (691,3112,3539,3548)

select top 100 * from tbEntitySalesItem with(nolock)
where SalesItemID in (691,3112,3539,3548) and EntityID = 588
order by 1 desc

select * from tbSalesItem with(nolock)
where SalesItemID in (691,3112,3539,3548)

select * from tbEntitySalesItemCost with(nolock)
where SalesItemID in (691,3112,3539,3548)
and EntityID = 588
order by CostChangeDate desc, SalesItemID

select top 100 * from tbEntitySalesItemCost with(nolock)
order by 1 desc