As far as I am aware, and coming from a time when we didn't have optimisers. All parts are evaluated
A part, in the case of a case else is is the statement as a whole. Select * from t where Id = 3 and date > 1997 Without the optimiser, It does Date > 1997 Id = 3 Select * With the optimiser it does Id =3 Date > 1997 Select * The example provided I have no idea which the optimiser thinks is more performant, the point being you can't write standard logic in SQL, all parts are executed. A select case is a special construct to get around the problems. I would not like to do the convert date on a string of characters over and over any way. Are all these dates stored in the same way? Davy Sent via telegraph. On 29 Oct 2012, at 10:25, Les Hughes <l...@datarev.com.au> wrote: > Davy Jones wrote: >> Hi >> >> SQL always executes right to left > Are you talking about boolean evauluation? If so... False. (At least for 2008 > R2 which I have in front of me) > -- > Les Hughes > l...@datarev.com.au