Which type of Numbers?

  • Comments posted to this topic are about the item Which type of Numbers?

    Thanks,
    Shiva N
    Database Consultant

  • Is that ... a recursive query to generate numbers? :sick:

    😀

    Technically, the numbers are rational numbers as well.

    Anyway, nice question.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • WOW64, I learned something new!

    😀

  • Had to look up what the different types of number were for some of them 🙂

  • And this relates to SQL Server how? I am not here for maths lessons.

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • Amstrong numbers. OK, Will try to remember it. 🙂

    Minor code improvement. SUBSTRING() : If start_expression is greater than the number of characters in the value expression, a zero-length expression is returned. So ISNULL() is useless here.

  • Sean Pearce (9/16/2014)


    And this relates to SQL Server how? I am not here for maths lessons.

    It's an exercise in reading T-SQL 🙂

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • This was removed by the editor as SPAM

  • Koen Verbeeck (9/16/2014)


    Sean Pearce (9/16/2014)


    And this relates to SQL Server how? I am not here for maths lessons.

    It's an exercise in reading T-SQL 🙂

    So reading the SQL will give you the convoluted university level naming convention for the number sequence?

    Rather just let us choose from a list of number sequences.

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • serg-52 (9/16/2014)


    Amstrong numbers. OK, Will try to remember it. 🙂

    Minor code improvement. SUBSTRING() : If start_expression is greater than the number of characters in the value expression, a zero-length expression is returned. So ISNULL() is useless here.

    + 1, good note 🙂

    Thanks & Best Regards,
    Hany Helmy
    SQL Server Database Consultant

  • Sean Pearce (9/16/2014)


    And this relates to SQL Server how? I am not here for maths lessons.

    + 1

    Thanks & Best Regards,
    Hany Helmy
    SQL Server Database Consultant

  • Koen Verbeeck (9/16/2014)


    Sean Pearce (9/16/2014)


    And this relates to SQL Server how? I am not here for maths lessons.

    It's an exercise in reading T-SQL 🙂

    Still not convinced it`s important to us SQL users.

    Thanks & Best Regards,
    Hany Helmy
    SQL Server Database Consultant

  • Hany Helmy (9/16/2014)


    Koen Verbeeck (9/16/2014)


    Sean Pearce (9/16/2014)


    And this relates to SQL Server how? I am not here for maths lessons.

    It's an exercise in reading T-SQL 🙂

    Still not convinced it`s important to us SQL users.

    Agreed that there is very limited practical application from a math perspective, but we are here to learn. After all, if all of these questions were gimmes and there was no challenge, the QoTD would be pedantic and meaningless. 😉

    This particular question has validity because it offers some creativity. Look at some of the SQL commands and their combinations used to create this solution:

    - Common Table Expressions

    - Unions

    - less common functions such as POWER

    - OPTION with MAXRECURSION

    BOL is very good at explaining how a single topic works. BOL is not very good at guiding you in how to use those in complicated situations.

    For seasoned veterans (where I assume you are), you may not get much out of it. For many, they will learn something new. For me, I have used cte's extensively, but haven't had a need for the MAXRECURSION option so I took this opportunity to read up on it.

  • Hany Helmy (9/16/2014)


    Sean Pearce (9/16/2014)


    And this relates to SQL Server how? I am not here for maths lessons.

    + 1

    + select floor(log(square(POWER(substring (cast (1000 as varchar(10)),1,1),5000))*3))

    ---------------
    Mel. 😎

  • I thought it was a neat question.

    It wasn't that difficult looking up the types of numbers in the answers and I learned something new and interesting.

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

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