Posted by Thomas R. Hummel on 10/01/02 11:33
Thanks for the suggestion Erland. I would have to join to a union of
the tables or perform multiple insert statements using NOT EXISTS (or
equivalent LEFT JOIN logic) to make sure that I only add each row once.
I will try to set this up and run some tests on it, but in the meantime
I found another solution that is adequate. I've generated a table
using:
SELECT CLM_ID, MIN(LN_NO)
FROM Target.dbo.Target
GROUP BY CLM_ID
Using this table I created a view on the full set of UNION'd tables
joined to this so that it only returns one row per claim (the one with
the minimum LN_NO). At least for what I was doing this gave performance
that was acceptable until I have time to further optimize it.
Thanks,
-Tom.
[Back to original message]
|