Update By the way, we've been in production for several months already and we discovered this problem just few days ago! Our customers received incorrect data due to the wrongly written SQL statement...
>Hi Nadya,
>
>I would try.
select upper(CCODE+TOWN+STREET+str(STNUM,4)+STNUMEXT+UNIT) ;
> as Address, * from (m.tcTableName) ;
> WHERE upper(CCODE+TOWN+STREET+str(STNUM,4)+STNUMEXT+UNIT) + DTOS(date) in ( ;
> SELECT Address + DTOS(maxdate) FROM curTemp)
>
I think, now you can combine two queries in one this way.
>
He-he, that's another variation, which I just wrote too. However, I don't think, it could be re-written as a single query. At least, I don't see it. Fortunately, in my case I can use two queries...
Both queries return identical results (inner join variation and sub-query variation), I think, sub-query is faster...
If it's not broken, fix it until it is.
My Blog