Choosing values

  • Comments posted to this topic are about the item Choosing values

  • This was removed by the editor as SPAM

  • Didn't got a chance to use it may be in future. thanks for the refresher Steve. nice question.

  • Guessed wrongly that it was zero-based.

    I've never used this function and have no intention of starting - it does nothing that cannot already be achieved by other means.

    Does anyone know why this (and other similar Access-like functions) were introduced?

  • This was removed by the editor as SPAM

  • Stewart "Arturius" Campbell (9/23/2015)


    I believe it was, inter alia, to make the transition from Access-based databases to SQL Server simpler.

    Hadn't spotted that CHOOSE was added in SQL2012 ...

    ... nor that IIF had been added too. Never understood why IIF was needed (as a function) rather than adding IF or CASE to the language, I have the most horrific nested IIF statements in Excel, with the occasional AND() and/or OR() functions thrown in too. Would have been much easier to write a proper, structured, logic statement instead of nested Logic Functions 🙁

  • Good question with an easy answer only because I am restudying the excellent book 'Querying Microsoft SQL Server 2012' ( Exam 70-461 ) since the last fortnight after having discovered that I have forgotten some subtleties about pivoting/unpivoting data. And , to refresh me , I have begun by the start of the book.

  • Stewart "Arturius" Campbell (9/22/2015)


    Interesting question, thanks Steve

    Another of the functions copied from Excel.

    I don't think so. These functions have been introduced only to make easier the translation Access towards SQL Server ( the future of Access seems not to be all roses ).

  • patricklambin (9/23/2015)


    Stewart "Arturius" Campbell (9/22/2015)


    Interesting question, thanks Steve

    Another of the functions copied from Excel.

    I don't think so. These functions have been introduced only to make easier the translation Access towards SQL Server ( the future of Access seems not to be all roses ).

    MS Access should have died a long long time ago.

  • Thanks for the question. The key is to remember that it is 1-based.

  • Yep, never used this one & can't think of a good reason to 🙂

  • It's somewhere between the CASE and the Oracle DECODE function. You can do everything with a CASE statement, but until I get up to SQL 2012 :crying:, I won't be able to compare performance against the CASE.

  • Manic Star (9/23/2015)


    patricklambin (9/23/2015)


    Stewart "Arturius" Campbell (9/22/2015)


    Interesting question, thanks Steve

    Another of the functions copied from Excel.

    I don't think so. These functions have been introduced only to make easier the translation Access towards SQL Server ( the future of Access seems not to be all roses ).

    MS Access should have died a long long time ago.

    MS Access has an audience which is different from the audience of SQL Server.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • Luis Cazares (9/23/2015)


    Manic Star (9/23/2015)


    patricklambin (9/23/2015)


    Stewart "Arturius" Campbell (9/22/2015)


    Interesting question, thanks Steve

    Another of the functions copied from Excel.

    I don't think so. These functions have been introduced only to make easier the translation Access towards SQL Server ( the future of Access seems not to be all roses ).

    MS Access should have died a long long time ago.

    MS Access has an audience which is different from the audience of SQL Server.

    Until they can't do something because of its limitations then it becomes my problem because its a 'database'.

  • Luis Cazares (9/23/2015)


    Manic Star (9/23/2015)


    patricklambin (9/23/2015)


    Stewart "Arturius" Campbell (9/22/2015)


    Interesting question, thanks Steve

    Another of the functions copied from Excel.

    I don't think so. These functions have been introduced only to make easier the translation Access towards SQL Server ( the future of Access seems not to be all roses ).

    MS Access should have died a long long time ago.

    MS Access has an audience which is different from the audience of SQL Server.

    I agree with Luis. The problem is not Access. The problem is people/companies using Access for something it was not really intended to be used for.



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

Viewing 15 posts - 1 through 15 (of 26 total)

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