Boris! You BEAUTY! I send you a virtual big kiss on the cheek.
In English we have an expression "Can't see the wood for (because of) the trees". As you can see, I have a lot of "trees" in that code :-)
As I'd deduced, the error was creeping in on the not ETM side. The simplified code that we came up with for the SQL was missing some of the data, so I put the
OR ( NET.Start_date < m.ldStartCurr AND NET.End_date > m.ldEndCurr) ;
and
OR ( NET.Start_date < m.ldStartPrev AND NET.End_date > m.ldEndPrev)) ;
lines in. And, as you can see, the final bracket somehow got in the wrong place. I was totally blind to it, and the editor's intellisense didn't highlight the bracket boundaries/scope, because I put it in later.
It's all working great now, I'm so pleased.
And I just got your s/s/ mail, so I'm salivating
Honest, friend, I don't know how I'd have got on without your invaluable help and I am ever in your debt.
:-)
>Terry you again have brackets problem :-))))
Not as bad as your smiley's though :-)
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.