• DonlSimpson (3/2/2015)


    TomThomson (3/1/2015)


    siggemannen (2/28/2015)


    Hello,

    I have encountered some weird behaviour. Code that has been working for "eternities" suddenly started to fail.

    Alas, i couldn't recreate it on any other machines.

    I'm afraid that this is part of the ongoing farce resulting from treating the optimiser as a sacred cow. There's a Microsoft connect item that covers this bizarre behavious and a lot of other similar nonsense and Microsoft said way back 5 years ago that they hoped to address it in a future version, but nothing has happened yet. Of course teh SQL standard probably says that what should happen is undefined, as it was driven by people (IBM, Oracle, etc) with axes to grind and awfully ill-conceived implementations to support). It's the same problem as the issue raised in another Microsoft Connect item where MS said (again about 5 years ago) "Another workaround, which is what the server should be doing automatically, is to push the subquery down into a subselect" before closing the item because the insance behaviour is "By Design". Rules about evaluation order which efectively render the language free of any useful semantics which, without a rule that an error occurring on an execution branch which is not logically required should not cause a failure, were added to the standard so as to permit bizarre results.

    We are all suffering from IBM's decision to exclude both Codd and all its famous computer language experts from the design of SEQUEL (whch is what became SQL), and the absolute failure of ANSI and ISO to impose any decent language design on teh resulting mess.

    +1.

    Codd was working for IBM at the time, and IBM asked him to do it. To be fair, a lot of it was not just "ill-conceived". Computers were vastly less powerful back then, and some compromises had to be made to get any style of relational db functioning. The first one or two SystemR versions were known for horrible performance at times.

    SQL DBA,SQL Server MVP(07, 08, 09) A socialist is someone who will give you the shirt off *someone else's* back.