On 25 Feb 2014, at 4:31am, Keith Medcalf <[email protected]> wrote:
> does generate a plan with only one execution of each correlated subquery, but
> does not give me access to the intermediate results
You might experiment with creating a view for the subquery instead of for the
query as a whole:
CREATE VIEW ratesView AS SELECT RateClass
from TKEmpRateClass
where Year*12+Month-1 <=
RawYear*12+RawMonth-1
order by Year desc, Month desc limit 1
or even incorporate the coalesce() into it.
Simon.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users