BETWEEN

  • Alexander Suprun (3/8/2012)


    There is no correct answer to the question, because the query may return either 6 or None records.

    Here is my result:

    Looks like you may have a different default schema. The create, insert, and drop statements in the question probably should have included the schema as well.

  • Lynn Pettis (3/8/2012)


    Alexander Suprun (3/8/2012)


    There is no correct answer to the question, because the query may return either 6 or None records.

    Here is my result:...

    Looks like you may have a different default schema. The create, insert, and drop statements in the question probably should have included the schema as well.

    Definitely I have a different schema. The schema must be included in every statement or be skipped in every statement, only then we can guarantee this will work as expected.


    Alex Suprun

  • Alexander Suprun (3/8/2012)


    Lynn Pettis (3/8/2012)


    Alexander Suprun (3/8/2012)


    There is no correct answer to the question, because the query may return either 6 or None records.

    Here is my result:...

    Looks like you may have a different default schema. The create, insert, and drop statements in the question probably should have included the schema as well.

    Definitely I have a different schema. The schema must be included in every statement or be skipped in every statement, only then we can guarantee this will work as expected.

    In most cases, the way the statements were code in the question, will work. If your installation is different than a generic install, then you are really comparing apples and oranges.

    I have seen the same thing when people start coding using all lower case and then switch to upper case for column names or table names. If the server or database they ar using is setup using a case insensitive collation, everything works fine. If you go to a server or database where it is using a case sensitive collation it fails. Sometimes you just have to make a few assumptions when looking at the QotD as to what is going on. Sorry, but not everyone is going to remember to tell you every detail of the setup of the question.

  • Good straightforward question. Thanks for submitting.

    http://brittcluff.blogspot.com/

  • Way too EZ 🙂

    Thanks & Best Regards,
    Hany Helmy
    SQL Server Database Consultant

Viewing 5 posts - 46 through 49 (of 49 total)

You must be logged in to reply to this topic. Login to reply