poate?!?!?!
select X.Nr,X.Data,X.tip from (
SELECT nr_inreg Nr, MAX(data_inreg) AS Data, max(tip) AS tip
FROM dbo.Table2
GROUP BY nr_inreg
HAVING (MAX(data_inreg) < CONVERT(DATETIME, '2007-07-26 00:00:00', 102))
) X
where X.tip is null
alex.
edit: l-am mai testat si nu e bun :(