Re: SQL Query x Multiple table Scans Michel Esber wrote:
> I understand what´s happening here, and the result set is not
> incorrect (according to the query).
I do not understand what's happening here.
> Hope that it makes sense now.
No it doesn't, you are assuming we have the same local knowledge as you.
1. We are missing the sample data for the asset table
2. You keep flip flopping between 30 days and 90 days which confuses the
matter
3. Shouldn't matter, but: Why are you adding the literal into the NOT
EXISTS with the HAVING?
I propose we restart with a clean slate:
Define both tables, define contents for both. Define the output.
Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab |