declare @fi datetime 
declare @ff datetime 
set @fi=getdate()
select @fi
SELECT  IN_INVENTORY.INVTIDSKU,
		IN_INVENTORY.DESCR,
		IN_INVENTORYALTER.INVTIDBARR,
		IN_VENDORINVT.BUYCOD,
		IN_VENDORINVT.VENDIDSS,
		IN_VENDORINVT.CURYID,
		IN_VENDORINVT.STDCOST
	FROM 	IN_INVENTORY 
		LEFT JOIN IN_INVENTORYALTER
		ON IN_INVENTORY.INVTIDSKU=IN_INVENTORYALTER.INVTIDSKU 
		LEFT JOIN IN_VENDORINVT ON IN_INVENTORY.INVTIDSKU=IN_VENDORINVT.INVTIDSKU
        WHERE	IN_VENDORINVT.VENDIDSS='20100030838' AND
                IN_INVENTORY.DISASSEMBLE=0 AND SITEID='00057' AND  
		(IN_INVENTORY.INVTIDSKU='100021' OR IN_INVENTORYALTER.INVTIDBARR='100021' OR IN_VENDORINVT.BUYCOD='100021')

set @ff=getdate()
select @ff
select @ff-@fi