Hi,
I am having problems with an SQL select where the sub-select yields a null
date value, as the field in the original select does not seem to equate to
the null date. I get no records returned.
The SQL select statement below works fine when there is a date in the
counts_dt field, but does not work when the sub-select yields a null date
value.
SELECT * FROM COUNTS WHERE counts.counts_dt = (SELECT distinct
MAX(isnull(c2.counts_dt,NULL)) FROM counts c2 WHERE c2.property =
counts.property AND c2.unit = counts.unit AND c2.cntitem_id =
counts.cntitem_id AND c2.cnttype_id = counts.cnttype_id)
Any help would be appreciated.
Thanks in advance,
Pauline