All pastes #41989 Raw Edit

Mine

public text v1 · immutable
#41989 ·published 2006-02-17 20:46 UTC
rendered paste body
SELECT 

	t.adjustment_reason,
	t.iia_date,
	t.iia_quantity,
	
	im.description, 
	im.item_id,
	im.upc_ean,
	
	ip.ip_item_price

FROM

	dbo.inventory_adjustments t,
	dbo.item_master im,
	dbo.item_price ip

WHERE 
	t.record_status <> 3
	AND im.item_id = t.item_id
	AND t.iia_date BETWEEN '02/01/2006' AND '02/14/2006'	

ORDER BY
	im.upc_ean





----------------------



Select  t.IP_UNIT_PRICE
   From dbo.ITEM_PRICE t 
	Where  (t.ITEM_ID = 40036)
  And  ((t.IP_START_DATE <= '2/14/2006') AND ((t.IP_END_DATE >= '2/14/2006') OR (t.IP_END_DATE IS NULL)))
  And  (t.HOLD_PRICE = 0)
  And t.RECORD_STATUS <> 3


the 40036 is the item_id
the date will have to be the iia_date in the first query because we need accurate prices for X date.