My code is broken...
I'm trying to pull in the a snapshot as of 1/1/2011, but my subquery isn't being kind. Could some kind and magnificient bastard please point out the obvious and glaring error in my script?
and sr.THING_dt = (SELECT MAX(sr2.THING_dt) from ere..sale_THING sr2
where sr2.THING_class = sr.THING_class and sr.THING_id = sr2.THING_id
and sr2.THING_dt <= '1/1/2011')
EDIT: Solved. The failure wasn't in the subquery, per se. There were additional constraints outside of the subquery that needed to be removed from my initial select.