SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


BETWEEN


BETWEEN

Author
Message
Jeff Deluca
Jeff Deluca
SSChasing Mays
SSChasing Mays (657 reputation)SSChasing Mays (657 reputation)SSChasing Mays (657 reputation)SSChasing Mays (657 reputation)SSChasing Mays (657 reputation)SSChasing Mays (657 reputation)SSChasing Mays (657 reputation)SSChasing Mays (657 reputation)

Group: General Forum Members
Points: 657 Visits: 229
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
jim.powers
jim.powers
SSCrazy
SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)

Group: General Forum Members
Points: 2898 Visits: 871
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.
GSquared
GSquared
SSC Guru
SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)

Group: General Forum Members
Points: 61035 Visits: 9730
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
Harit Gohel
Harit Gohel
Right there with Babe
Right there with Babe (728 reputation)Right there with Babe (728 reputation)Right there with Babe (728 reputation)Right there with Babe (728 reputation)Right there with Babe (728 reputation)Right there with Babe (728 reputation)Right there with Babe (728 reputation)Right there with Babe (728 reputation)

Group: General Forum Members
Points: 728 Visits: 232
I agreed with Mark...Question was not to test ENGLISH it was to test the BETWEEN (T-SQL context).....Hehe
Q -631159
Q -631159
SSC-Addicted
SSC-Addicted (455 reputation)SSC-Addicted (455 reputation)SSC-Addicted (455 reputation)SSC-Addicted (455 reputation)SSC-Addicted (455 reputation)SSC-Addicted (455 reputation)SSC-Addicted (455 reputation)SSC-Addicted (455 reputation)

Group: General Forum Members
Points: 455 Visits: 165
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
Anipaul
Anipaul
SSCrazy Eights
SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)

Group: General Forum Members
Points: 9975 Visits: 1407
why complain folks, question is good, only you have to read it long time to understand.....Smile



Marius Els
Marius Els
Old Hand
Old Hand (344 reputation)Old Hand (344 reputation)Old Hand (344 reputation)Old Hand (344 reputation)Old Hand (344 reputation)Old Hand (344 reputation)Old Hand (344 reputation)Old Hand (344 reputation)

Group: General Forum Members
Points: 344 Visits: 180
I stepped into the answer to quickly as well.... unfortunately selecting yes, as my "interpretation" also (like many others) was running the query on select #1 and #2 multiple times, where my focus should have been on "this a between test" and not "what if the selects are run multiple times".....

good question, if you think a bit longer about it

well better luck next time BigGrin
Matt Miller (4)
Matt Miller (4)
SSC-Dedicated
SSC-Dedicated (30K reputation)SSC-Dedicated (30K reputation)SSC-Dedicated (30K reputation)SSC-Dedicated (30K reputation)SSC-Dedicated (30K reputation)SSC-Dedicated (30K reputation)SSC-Dedicated (30K reputation)SSC-Dedicated (30K reputation)

Group: General Forum Members
Points: 30981 Visits: 19011
Thanks for the feedback folks... Some good comments. I will try to incorporate them next time.

I did have a bit of a hard time wording it. The goal was to allow you to run the entire script however many times and compare the results from #1 to #2 and not different generations of #1 to each other and #2 to each other. That didn't always come out, so it could have been worded better.

The "consistently" was inserted later to deal with the "1 in a billion" chance that a run of the SELECT...INTO happened to generate a quarter million values all outside of the 3-5 range....which would be the exception where #1 and #2 WOULD in fact be the same. Not likely, but possible.

I do like Philip's rewrite - but it still doesn't quite get to to heart of comparing #1 to #2. You'd have to reword as:

"Would statement #1 always generate a result identical to #2's ?" (answer - no, not always, but once in a blue blue moon, perhaps)

Anyway - as said before - I will take these into account next time..Smile

----------------------------------------------------------------------------------
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?
Mohamed-401375
Mohamed-401375
SSC Eights!
SSC Eights! (897 reputation)SSC Eights! (897 reputation)SSC Eights! (897 reputation)SSC Eights! (897 reputation)SSC Eights! (897 reputation)SSC Eights! (897 reputation)SSC Eights! (897 reputation)SSC Eights! (897 reputation)

Group: General Forum Members
Points: 897 Visits: 97
Good question, does a good job of testing knowledge about BETWEEN,
but bad english.

I think the questioner needs to know the difference between 'consistent' and 'same as'.

Consistent means same result everytime and each time

'same as' - statement #1 's result = statement #2 's result
chajere
chajere
SSC Veteran
SSC Veteran (214 reputation)SSC Veteran (214 reputation)SSC Veteran (214 reputation)SSC Veteran (214 reputation)SSC Veteran (214 reputation)SSC Veteran (214 reputation)SSC Veteran (214 reputation)SSC Veteran (214 reputation)

Group: General Forum Members
Points: 214 Visits: 54
I think that this question was correctly formed.BigGrin
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search