June 4, 2008 at 8:08 pm
Comments posted to this topic are about the item BETWEEN
----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
June 4, 2008 at 8:23 pm
Good question. The detail-oriented person earns 1 point as reward. 🙂
June 4, 2008 at 11:58 pm
Badly worded question -
Would statements #1 and #2 consistently return the same result set?
How do we define "Same Result" Same result as the other statement? Same result across multiple executions of each statement?
Obviously statement #2 will always return 0 - 5 is greater than 3. DUH. But if you rerun statement #1 (without rerunning the CREATE / INSERT statements), it will always return the same result; just as statement #2 will always return 0.
Sorry, didn't like that question at all. This reminds me of the old style MS certification questions - the answer is open to interpretation of the question.
At least I get a point for this post ...:P
June 5, 2008 at 1:38 am
my understanding was that subsequent runs of statement #1 and statement #2 would return the same result (over time)- which does, if the table is not cleared and the insert rerun.... not that the two results whould be equal to each other (i say it was quite obvious that the 2nd would return 0 )
oh well... 🙂
June 5, 2008 at 2:49 am
I don't normally criticise the questions as:
a. This site is free
b. You don't win anything
c. You nearly always learn something even when the question is ambiguous!
But this one is really ambiguous for me as depending on how you read the question all three answers are true:
1. Create the table insert the data once.
Would statement one always return the same answer - Yes, would statement two always return the same answer - Yes
2. Same scenario, but would statement one AND statement two return the same answer - No (Which is the point of the question as beautifully explained!) OK maybe it's too early in the morning and my brain wasn't quite with it as it really couldn't be option 1, but…
3. You run the whole script every time (it was a temp table after all!) - Well as the data could change each time - Undetermined!
So I had a one in three chance (seeing as I nearly always pick the wrong one in a fifty/fifty - I had no chance with a 1 in 3!) of picking the right answer, which of course I didn't!
So c. rules again, as at least I had to think about this one!
And it reminded me of – if you are using parameter values in the where, i.e. BETWEEN @Param1 AND @param2.
Check first if the @Param1 is less than @Param2 (if not swap them round!)
Rodders...
June 5, 2008 at 3:06 am
Hi
question is rather poorly worded. I thought the question was whether running the statements repeatedly would produce different results.
"Keep Trying"
June 5, 2008 at 3:27 am
I read the question as if multiple executions of the select statements would return the same result, so I unfortunately selected the incorrect answer.
I think that it would be better worded as:
"Would statements #1 and #2 consistently return identical result sets?"
What does everyone else think?
Regards,
Phil
June 5, 2008 at 6:15 am
statement 2 will always result the same result set: nothing
To my opinion, the answer is YES
The explanation was about a misused BETWEEN ... what a @#$!%!#
Wilfred
The best things in life are the simple things
June 5, 2008 at 6:16 am
I have to say that I did not like this question either. If you only run the create and insert once you will consistently get the same results in each of the queries seperately. Re-running them multiple times as in a stored proc, would obviously produce results that would not be consistent with the exception of query 2, but not both.
Sorry, trick questions open to interpretation are bogus. What is my knowledge, I guess that is open to interpretation too.
June 5, 2008 at 6:26 am
The title of the question was 'BETWEEN' therefore it was obviously going to test your between knowledge. Stop complaining and get back to work.
June 5, 2008 at 6:32 am
Whereas I can agree with the wording change from 'same' to 'identical', I thought it was obvious what this question was testing.
Good question.
Thanks
-Jeff
June 5, 2008 at 8:06 am
I felt like the question was a good question and was worded mostly well. Based on the feedback already posted, the only word I would have changed or removed was consistently. The way this was used would imply that the statements would be run multiple times on the same data set. In that case, the answer would be YES, which is what most folks were falling in to.
By removing the word consistently, I believe the question would have been completely correctly worded.
Despite my opinion here, I believe this was a good question as it was testing knowledge of the BETWEEN function.
June 5, 2008 at 9:09 am
I thought the question was clear enough. Good test of how Between works, which is all it seemed to me to be about.
I think some may have overthought it. That probably comes from some of the other questions, which have been "tricky".
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
June 5, 2008 at 9:42 am
I agreed with Mark...Question was not to test ENGLISH it was to test the BETWEEN (T-SQL context).....:hehe:
June 5, 2008 at 10:03 am
On my first read I thought that it was asking for consitancy on each execution, but when I thought about the select statements and the order of the between values, it was more clear that the author wanted to compare the result sets. Badly worded, but good example of how between works.
Q
Please take a number. Now serving emergency 1,203,894
Viewing 15 posts - 1 through 15 (of 62 total)
You must be logged in to reply to this topic. Login to reply