Hocam Kodum şu hale geldi sen son :
SELECT
IT.LOGICALREF,IT.CODE,IT.NAME,CL.LOGICALREF,
CL.CODE,CL.DEFINITION_,CL.SPECODE,CL.CARDTYPE
FROM LG_032_ITEMS as IT (NOLOCK)
inner join LG_032_CLCARD as CL (NOLOCK) on (CL.LOGICALREF = IT.LOGICALREF)
WHERE
(IT.LOGICALREF not in
(SELECT ST.STOCKREF FROM LG_032_01_STLINE as ST (NOLOCK)
WHERE ST.LINETYPE IN (0,1)
--and day(ST.DATE_) = 1
--and month(ST.DATE_) = 2
and year(ST.DATE_) = 2012
AND ST.INVOICEREF like '%')
)
and IT.CODE like '1%'
and CL.CODE like 'MS 3103'
ORDER BY CL.CODE
Şöyle bir durum var, her bayi için sadece tek kayıt geliyor.
Bayileri denedikce, ya 0 sonuç dönüyor, yada 1..
Subquery'den kaynaklanıyor sanırım bu durumda..