Subject Re: [ib-support] Question on UPDATE
Author Robert F. Tulloch
Hi:

Never mind. Got rid of the cast and substr(), modified updateSQL
accordingly
and all is well. Thanks.
Best
regards

> And IBDataSet SelectSQL:
>
> SELECT DISTINCT ID, MGRID, ADRESS_TEN, STNAME_TEN, CITY_TEN, STATE_TEN,
> ZIP_TEN, MAXDATE
> FROM TENANTS T1
> WHERE ADRESS_TEN >0 AND MAXDATE >= CURRENT_DATE - 1827 AND
> MAXDATE = (SELECT MAX(T2.MAXDATE) FROM TENANTS T2
> WHERE T2.ADRESS_TEN = T1.ADRESS_TEN AND
> T2.STNAME_TEN = T1.STNAME_TEN AND
> T2.CITY_TEN = T1.CITY_TEN AND
> T2.STATE_TEN = T1.STATE_TEN)
>
> Order By STATE_TEN Asc, CITY_TEN asc, STNAME_TEN Asc, ADRESS_TEN
> Asc , MAXDATE ASC
>