September 15, 2014 at 9:41 pm
Comments posted to this topic are about the item Which type of Numbers?
Thanks,
Shiva N
Database Consultant
September 16, 2014 at 12:56 am
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
September 16, 2014 at 1:04 am
WOW64, I learned something new!
😀
September 16, 2014 at 1:29 am
Had to look up what the different types of number were for some of them 🙂
September 16, 2014 at 3:10 am
September 16, 2014 at 3:26 am
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.
September 16, 2014 at 3:28 am
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
September 16, 2014 at 4:04 am
This was removed by the editor as SPAM
September 16, 2014 at 4:16 am
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.
September 16, 2014 at 4:49 am
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
September 16, 2014 at 4:59 am
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
September 16, 2014 at 5:00 am
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
September 16, 2014 at 6:39 am
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.
September 16, 2014 at 6:41 am
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. 😎
September 16, 2014 at 6:54 am
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