﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQLServerCentral.com Announcements / SQLServerCentral.com  / ALL / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sun, 19 May 2013 14:14:33 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: ALL</title><link>http://www.sqlservercentral.com/Forums/Topic525535-83-1.aspx</link><description>nice +2</description><pubDate>Fri, 07 Dec 2012 04:19:51 GMT</pubDate><dc:creator>kapil_kk</dc:creator></item><item><title>RE: ALL</title><link>http://www.sqlservercentral.com/Forums/Topic525535-83-1.aspx</link><description>Hi Hugo Kornelis,Thanks a lot.</description><pubDate>Mon, 16 Mar 2009 02:51:21 GMT</pubDate><dc:creator>Balachandra</dc:creator></item><item><title>RE: ALL</title><link>http://www.sqlservercentral.com/Forums/Topic525535-83-1.aspx</link><description>[quote][b]Balachandra (3/16/2009)[/b][hr]Hi AllI am not sure wichi is correct answer. Beacuse the same question is repeted twice.1st time i entered as 0 and answer was wrong.2nd time i entered as 1 still anser was wrong saying it is 0is this a valid question ?[/quote]Hi Balachandra,You have made a small reading mistake. The same question is not repeated twice; there is one small but important difference. The "first" question uses ANY, whereas the "second" (this) question uses ALL. These two keywords modify the meaning of the subquery in different ways; for that reason the question with ANY had 1 as the correct answer, and the question with ALL has 0 as the correct answer.</description><pubDate>Mon, 16 Mar 2009 02:44:11 GMT</pubDate><dc:creator>Hugo Kornelis</dc:creator></item><item><title>RE: ALL</title><link>http://www.sqlservercentral.com/Forums/Topic525535-83-1.aspx</link><description>Hi AllI am not sure wichi is correct answer. Beacuse the same question is repeted twice.1st time i entered as 0 and answer was wrong.2nd time i entered as 1 still anser was wrong saying it is 0is this a valid question ?</description><pubDate>Mon, 16 Mar 2009 01:45:17 GMT</pubDate><dc:creator>Balachandra</dc:creator></item><item><title>RE: ALL</title><link>http://www.sqlservercentral.com/Forums/Topic525535-83-1.aspx</link><description>Nice questions ......</description><pubDate>Tue, 01 Jul 2008 07:24:37 GMT</pubDate><dc:creator>Anipaul</dc:creator></item><item><title>RE: ALL</title><link>http://www.sqlservercentral.com/Forums/Topic525535-83-1.aspx</link><description>gij onnozel manneke...</description><pubDate>Tue, 01 Jul 2008 02:24:22 GMT</pubDate><dc:creator>thierry.vandurme</dc:creator></item><item><title>RE: ALL</title><link>http://www.sqlservercentral.com/Forums/Topic525535-83-1.aspx</link><description>Thanks Steve, that is indeed very kind of you !!And I won't hold it against you just because you are from the US !!!Ken.</description><pubDate>Tue, 01 Jul 2008 02:20:41 GMT</pubDate><dc:creator>kaspencer</dc:creator></item><item><title>RE: ALL</title><link>http://www.sqlservercentral.com/Forums/Topic525535-83-1.aspx</link><description>I'll award points back to you, since the narrow minded US author (me) didn't think in terms of case sensitivity. I'll try to consider that for future questions.The question has been altered to clarify and correct the Value1 v value1 typo.</description><pubDate>Mon, 30 Jun 2008 10:17:24 GMT</pubDate><dc:creator>Steve Jones - SSC Editor</dc:creator></item><item><title>RE: ALL</title><link>http://www.sqlservercentral.com/Forums/Topic525535-83-1.aspx</link><description>Objection!!Value1 is indeed LESS THAN value1, no matter how many times value1 appears in the table.Therefore I claim my points.AND don't claim that you didn't mention case sensitivity, because we don't allow any assumptions! We take it at face value.Kenneth Spencer</description><pubDate>Mon, 30 Jun 2008 09:30:55 GMT</pubDate><dc:creator>kaspencer</dc:creator></item><item><title>RE: ALL</title><link>http://www.sqlservercentral.com/Forums/Topic525535-83-1.aspx</link><description>Well, I got caught by the collation thing as well. When I looked at the expression and the values to test, I did go review an ASCII chart before answering. A capital V has a decimal value of 86 while a lower case v has a decimal value of 118. The IF statement is checking to see if 'Value1' is less than ALL of the values returned from the subquery (those values being value1, value2, value3, value4).'Value1' is obviously less than the last three which left the first one to question. If the database is NOT CaSe sensitive, the result would be 0 since 'Value1' is = to 'value1'.If the database IS CaSe sensitive, the result would be 1 since 'Value1' is &amp;lt; 'value1'. I answered as if the database were CaSe sensitive and therefore got the answer wrong. There have been CaSe questions before so really, both answers are correct since the collation was not specified as part of the question.Not a bad question but this small piece of information was left out so it could not be answered correctly.</description><pubDate>Mon, 30 Jun 2008 07:37:04 GMT</pubDate><dc:creator>jim.powers</dc:creator></item><item><title>RE: ALL</title><link>http://www.sqlservercentral.com/Forums/Topic525535-83-1.aspx</link><description>I just noticed that the answer says "A -&amp;gt;= would return true", while I guess the author had "&amp;lt;=" in mind... ;)Thanks for the collation hint, I ran into such tricky problems too, a couple of times :)I considered those values a kind of "meta-values", meaning that they were generic values, so didn't pay much attention to their case :cool:</description><pubDate>Mon, 30 Jun 2008 07:13:14 GMT</pubDate><dc:creator>luca.pierobon</dc:creator></item><item><title>RE: ALL</title><link>http://www.sqlservercentral.com/Forums/Topic525535-83-1.aspx</link><description>I use to worry about the points, but life is too short to worry about such unimportant things like that.</description><pubDate>Mon, 30 Jun 2008 06:46:15 GMT</pubDate><dc:creator>Steven Cameron</dc:creator></item><item><title>RE: ALL</title><link>http://www.sqlservercentral.com/Forums/Topic525535-83-1.aspx</link><description>just to let you know I'm not picky either. Sorry if I seemed to be from my replyI just wanted to state that it was confusing (for me at least). Who cares about the points? I'm just here to learn...</description><pubDate>Mon, 30 Jun 2008 06:00:24 GMT</pubDate><dc:creator>thierry.vandurme</dc:creator></item><item><title>RE: ALL</title><link>http://www.sqlservercentral.com/Forums/Topic525535-83-1.aspx</link><description>:-)  glad that's sorted then. I'm not even playing for points so any and all comments/questions of mine can be taken to be innocent of motive :-).</description><pubDate>Mon, 30 Jun 2008 05:55:57 GMT</pubDate><dc:creator>pollockk</dc:creator></item><item><title>RE: ALL</title><link>http://www.sqlservercentral.com/Forums/Topic525535-83-1.aspx</link><description>[quote][b]pollockk (6/30/2008)[/b][hr]Maybe that's just because I have been caught by tables with case sensitive collations in real life.[/quote]Thanks for the clarification, Kirsty :)I'm glad you took the question as I think the author intended it, and that you're not one of the whiney "I want my point back" types that this site unfortunately appears to have too many of (I am in fact surprised that as of yet, there still aren't two to three pages of such replies :w00t: ).And I know all about being caught by this - most of my databases use a binary collation (for that tiny bit of extra speed :)), so I often have to correct lots of upper-/lowercase problems when copying sample code from any online resource... :(</description><pubDate>Mon, 30 Jun 2008 05:45:45 GMT</pubDate><dc:creator>Hugo Kornelis</dc:creator></item><item><title>RE: ALL</title><link>http://www.sqlservercentral.com/Forums/Topic525535-83-1.aspx</link><description>Of course these questions aren't about just running the SQL :-)The question's main intent is clear, it's a pretty simple question about ALL -  and I am not at all trying to be nitpicky or garner extra points or anything - it was just that in trying to work it out *in my head *, I noticed the case, noticed that it could affect the comparison, noticed that there wasn't enough info to deduce the whether the comparison would be case-sensitive or not - and thought that that might be an interesting *addendum/comment* to the main point.Maybe that's just because I have been caught by tables with case sensitive collations in real life.KirstyEDIT: typo + reword for clarity of intent.</description><pubDate>Mon, 30 Jun 2008 05:32:11 GMT</pubDate><dc:creator>pollockk</dc:creator></item><item><title>RE: ALL</title><link>http://www.sqlservercentral.com/Forums/Topic525535-83-1.aspx</link><description>[quote][b]brewmanz (6/30/2008)[/b][hr]The table is called 'TimeGroup' but the query is 'TimeGROUP'If the DB was case-sensitive, then the query would NOT find the table, unless there was ANOTHER table TimeGROUP - and the result of the query was *indeterminate* - not an option - so ...The DB must be Case-Insensitive !!QED - kind of[/quote]&amp;lt;nitpicking&amp;gt;Except that it is perfectly possible to define a table with a case sensitive collation in a database with a case insensitive default collation...&amp;lt;/nitpicking&amp;gt;However, I had no doubt whatsoever after reading the question that it was written without case sensitive collations in mind. The title of the question was "ALL", so it was clear that the author wanted to test understanding of this keyword, not ability to test some code by running it and then complaining if collations didn't match. I dare to state that anyone who really knows and understands the "ANY" keyword, should be able to answer this question correctly.(Edit - fixed the fake HTML tags)</description><pubDate>Mon, 30 Jun 2008 05:21:24 GMT</pubDate><dc:creator>Hugo Kornelis</dc:creator></item><item><title>RE: ALL</title><link>http://www.sqlservercentral.com/Forums/Topic525535-83-1.aspx</link><description>[quote][b]pollockk (6/30/2008)[/b][hr]Depends on whether the collation is case-sensitive or not. If it is the answer is 1...[/quote]That's what I thought too, But the Q poser knew that, and knew that I knew that, and I knew that they knew that ... giving an answer alternating between 0 and 1 depending on when you stop. *BUT*The poser, by not giving an option of "it depends", or "Invalid object name 'TimeGROUP'" gives the game away .. because .. **  HERE BE SPOILERS **The table is called 'TimeGroup' but the query is 'TimeGROUP'If the DB was case-sensitive, then the query would NOT find the table, unless there was ANOTHER table TimeGROUP - and the result of the query was *indeterminate* - not an option - so ...The DB must be Case-Insensitive !!QED - kind of</description><pubDate>Mon, 30 Jun 2008 05:11:54 GMT</pubDate><dc:creator>brewmanz</dc:creator></item><item><title>RE: ALL</title><link>http://www.sqlservercentral.com/Forums/Topic525535-83-1.aspx</link><description>aggree with the collation thingiealso, the question mentions all lowercase strings while in the answer you mention VALUE1, which is all uppercase... confusing, that's what I think...</description><pubDate>Mon, 30 Jun 2008 04:21:19 GMT</pubDate><dc:creator>thierry.vandurme</dc:creator></item><item><title>RE: ALL</title><link>http://www.sqlservercentral.com/Forums/Topic525535-83-1.aspx</link><description>Depends on whether the collation is case-sensitive or not. If it is the answer is 1...--case sensitivecreate table TimeGROUP(column1 varchar(255) COLLATE SQL_Latin1_General_Cp1_Cs_AS)Insert into  TimeGROUP (column1) values('value1')Insert into  TimeGROUP (column1) values('value2')Insert into  TimeGROUP (column1) values('value3')Insert into  TimeGROUP (column1) values('value4')if 'Value1' &amp;lt; all ( select column1 from TimeGROUP ) select 1 else select 0drop table TimeGROUP--case insensitivecreate table TimeGROUP(column1 varchar(255) COLLATE SQL_Latin1_General_Cp1_CI_AS)Insert into  TimeGROUP (column1) values('value1')Insert into  TimeGROUP (column1) values('value2')Insert into  TimeGROUP (column1) values('value3')Insert into  TimeGROUP (column1) values('value4')if 'Value1' &amp;lt; all ( select column1 from TimeGROUP ) select 1 else select 0drop table TimeGROUP</description><pubDate>Mon, 30 Jun 2008 02:59:37 GMT</pubDate><dc:creator>pollockk</dc:creator></item><item><title>RE: ALL</title><link>http://www.sqlservercentral.com/Forums/Topic525535-83-1.aspx</link><description>Nice question, Steve.Too bad you didn't use the same case in the query and the list of values, as this might (*) result in different answers being returned when tested in a database with case-sensitive or binary collation.(*) "might", as I didn't bother to check if it reallly would. :)</description><pubDate>Mon, 30 Jun 2008 01:41:16 GMT</pubDate><dc:creator>Hugo Kornelis</dc:creator></item><item><title>RE: ALL</title><link>http://www.sqlservercentral.com/Forums/Topic525535-83-1.aspx</link><description>Heh, don't suppose I'm getting my two points, eh?Never mind, I'll take them from these replies.  Besides, I wouldn't want any more "enlightened" posters accusing me of point-mongering.</description><pubDate>Sun, 29 Jun 2008 10:50:28 GMT</pubDate><dc:creator>RBarryYoung</dc:creator></item><item><title>RE: ALL</title><link>http://www.sqlservercentral.com/Forums/Topic525535-83-1.aspx</link><description>Thanks, must have cut and pasted the wrong query in there.Corrected to be all.</description><pubDate>Sun, 29 Jun 2008 10:31:02 GMT</pubDate><dc:creator>Steve Jones - SSC Editor</dc:creator></item><item><title>RE: ALL</title><link>http://www.sqlservercentral.com/Forums/Topic525535-83-1.aspx</link><description>Uh, steve, this "ALL" query is the same as the "ANY" query last week, but it now reports a different answer.  NOTE that the word "ALL" does not appear anywhere in the question, a typo maybe?</description><pubDate>Sat, 28 Jun 2008 19:14:59 GMT</pubDate><dc:creator>RBarryYoung</dc:creator></item><item><title>ALL</title><link>http://www.sqlservercentral.com/Forums/Topic525535-83-1.aspx</link><description>Comments posted to this topic are about the item [B]&lt;A HREF="/questions/T-SQL/63121/"&gt;ALL&lt;/A&gt;[/B]</description><pubDate>Sat, 28 Jun 2008 13:34:47 GMT</pubDate><dc:creator>Site Owners</dc:creator></item></channel></rss>