-
This is a continuation of my previous blog post, Delimited String Tennis Anyone? , which playfully talked about a virtual T-SQL Tennis match… a friendly rally back and forth between SQL Server MVP Adam Haines and myself in discussing methods of shredding comma-delimited strings in our blogs. In my previous post, I expressed my disappointment with the
-
In my previous blog entry , I described in detail how you could use the FOR XML clause to create a column with a comma-separated list of entries acquired from rows in a table somewhere. In this article, we will do the opposite… We will take a comma-separated list and “shred” the individual items into rows. Let’s start by creating and populating a test
-
SQL Server MVP Adam Haines and I have been going back and forth for months in our blogs on the subject of creating and splitting a delimited string… it’s been kind of a virtual T-SQL Tennis match… not a competition, but rather a friendly rally, knocking the subject back and forth, practicing our skills. Between the two of us, we’ve just about beaten
-
It seems like the most frequently-asked question on the MSDN T-SQL Forum is how to put together a column that contains a list of some kind. For example, take a look at the Northwind database. There’s a Categories table and a Products table. We’d like to produce a list of all Categories and, for each Category, produce a column containing
-
Hi Jacob (and Madhivanan)... This difference in behavior is because of the new DATE datatype in SQL2008. In SQL2005, if you have SET DATEFORMAT DMY or had a language set to anything (like Czech) that has DAY come before MONTH, then the following assignment was illegal: DECLARE @D DATETIME SET @D='2009-01-13' --Error ...because it would interpret
-
Pragnesh... I agree with Jacob on this one. --Brad
-
Pragnesh... I suppose it is open to interpretation as to how one should center the Month/Year. In the example you gave, the Month/Year was 10 characters. Subtracting that from 29 leaves 19 characters to be divided by two. We decided to split it as 9+10, while you decided to split it as 10+9. If you look at the original challenge, in the example with
-
1) True, it is a single query. I misunderstood your original question, though. We want you to generate the fibo numbers from scratch as opposed to writing 92 UNIONed queries with the fibo numbers hard-coded. That's really the whole point of the exercise. 2) I think the answer to this question is moot based on the answer to the first question. -
-
@Misieq: Yes, the Fibonacci numbers have to be generated by you... in the same single query where you produce the final result. Your single query should generate the numbers, analyze them, and spit out the result. I'm not sure I fully understand your second question. The only reason 92 Fibo numbers was mentioned in the challenge is because the 93rd
-
For this particular challenge, there can't be a "tricky" test or "load" test... simply because there is no data supplied... the query generates its own data from scratch. After checking the accuracy of the output, we'll just rank based on (CPU,Read,Duration) statistics.