Re: Dumb question--between/and
Posted in 1994
> ->Can someone tell me what is wrong with this between clause? Seems to > cause a->long transaction, which aborts-- > -> > ->Select author from marc > ->where creation_date between "19930901*" and "19940831*" and > ->title_id in (select title_id from item where agency_id = "TNR") > ->end Blimey, there's all sorts in there. The "*" in the date (or datetime?) column would be confusing the poor engine horrendously. If creation_date is type DATE, what lower level are you trying to get down to? - Take the "*" out and it might fare better. If it's DATETIME, then you need to be aware of the mandatory delimiters for this datatype. Indexes: Have you got an index on (creation_date, title_id)? If not, who knows... Also why are you using an uncorrelated subquery when a straight join would do the job? > ->Thanks--must be in the manual somewhere... Oh, sure....... (BTW, that's *sarcasm* for you Americans...) akent@cix.compulink.co.uk (Andy Kent) -------------------------------------