June 26, 2013 at 9:56 pm
Comments posted to this topic are about the item Between Clause
--------------------------------------
;-)“Everything has beauty, but not everyone sees it.” ― Confucius
June 26, 2013 at 11:22 pm
I never used between for string operation. I also never seen this kind of condition in working scenario.
:doze:
Thanks
Vinay Kumar
-----------------------------------------------------------------
Keep Learning - Keep Growing !!!
June 27, 2013 at 12:02 am
Danny Ocean (6/26/2013)
I never used between for string operation. I also never seen this kind of condition in working scenario.:doze:
Same here...
I dont think there is any need of using BETWEEN with aplabets 😎
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
June 27, 2013 at 1:09 am
thanks for the question 1+
Neeraj Prasad Sharma
Sql Server Tutorials
June 27, 2013 at 2:05 am
why Doug is not in the list.
June 27, 2013 at 2:40 am
amit_adarsh (6/27/2013)
why Doug is not in the list.
If I pick the names and sort them in ascending order in excel sheet, I will get below
B.
Bob
Carl
D
D.
Doug
Now as the WHERE clause is "between 'B' and 'D'", it is clear I will only have top 4 values from the above list 🙂
~ Lokesh Vij
Link to my Blog Post --> www.SQLPathy.com[/url]
Follow me @Twitter
June 27, 2013 at 4:41 am
Answer makes sense, but plenty of people were fooled...
June 27, 2013 at 6:02 am
Danny Ocean (6/26/2013)
I never used between for string operation. I also never seen this kind of condition in working scenario.:doze:
I agree that it probably doesn't happen with string data so much, but it does help to make clear that the "between" operator works like >= and <= instead of > and < (I have seen many be fooled this way).
June 27, 2013 at 6:24 am
Interesting question.
June 27, 2013 at 6:57 am
Nice one, thanks!
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
June 27, 2013 at 7:54 am
I'm not sure that the case sensitive had any place other than to potentially mislead. The result, given the data, is the same so CI vs CS if Carl had been carl then it would matter.
June 27, 2013 at 8:22 am
Working with health data, we have a lot of code ranges that we deal with for reporting from varchar fields. I have only very rarely seen between used incorrectly, but I have needed to give exactly this clarification a few times.
June 27, 2013 at 9:04 am
I am dealing with BETWEEN often, but this was the first time I have seen it for strings. Wow - never thought of that.
Thanks, Gary!
June 27, 2013 at 9:17 am
Dough is outside the parameters of "where name between 'B' and 'D' "
Letter D preceeds Dough.
June 27, 2013 at 2:05 pm
I found the question pretty interesting question on how the solution was easily fulfilled. Thanks.
Viewing 15 posts - 1 through 15 (of 25 total)
You must be logged in to reply to this topic. Login to reply