﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Article Discussions / Article Discussions by Author / Discuss content posted by Scott Solice  / T-SQL / 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>Tue, 18 Jun 2013 19:54:07 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>I got lucky...I saw IN, clicked operator, hit submit and immediately hit stop on the browser as I saw the Predicate answer.You may deduct a point if necessary for changing my answer. I throw myself on the mercy of the forum... :-DI really DO need to read the whole list of answers more carefully...</description><pubDate>Tue, 16 Mar 2010 14:04:50 GMT</pubDate><dc:creator>Peter Trast</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>[quote][b]Steve Jones - Editor (1/7/2010)[/b][hr]Doh! It's fixed. I must have made a mistake when I changed the question.It now shows predicate as the answer. I'll fix points.[/quote]Steve, thanks for fixing the points but on the Total Scores page (http://www.sqlservercentral.com/TotalScores) I only see it fixed on the [b]Question of the Day Breakdown[/b] table in the [b]Points (won)[/b] column.  The [b]Score[/b] column on the [b]Question of the Day[/b] table does not show the correction.  You may need to fix it in both places.Blast that de-normalized data! ;-)Dave</description><pubDate>Fri, 08 Jan 2010 07:39:43 GMT</pubDate><dc:creator>Dave62</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>[quote][b]Christian Buettner-167247 (1/8/2010)[/b][hr][quote][b]SSSolice (1/7/2010)[/b][hr]In light of all the confusion, I respectfully apologize to everyone for not making the question more clear in the first place.:blush:[/quote]Well you posted a question and I thank you for entering the ring and offering your left &amp; right cheek :-D.And always remember - [code]Only those who do nothing do not make mistakes[/code][/quote]hmmmm.... I think doing nothing is also a mistake....For all that's required for evil to succeed in this world is for good men (like yourselves helping others here ;) to do nothing!</description><pubDate>Fri, 08 Jan 2010 01:12:54 GMT</pubDate><dc:creator>Chris Hamam</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>[quote][b]SSSolice (1/7/2010)[/b][hr]In light of all the confusion, I respectfully apologize to everyone for not making the question more clear in the first place.:blush:[/quote]Well you posted a question and I thank you for entering the ring and offering your left &amp; right cheek :-D.And always remember - [code]Only those who do nothing do not make mistakes[/code]</description><pubDate>Fri, 08 Jan 2010 01:05:49 GMT</pubDate><dc:creator>Christian Buettner-167247</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>I was banged around quite a bit with my first QotD as well.good on you for having the guts to post one.lessons learned - be positive, do not be scared to post more questions.</description><pubDate>Thu, 07 Jan 2010 22:43:14 GMT</pubDate><dc:creator>Stewart "Arturius" Campbell</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>According to ms-help://MS.SQLCC.v10/MS.SQLSVR.v10.en/s10de_6tsql/html/edd92f08-76fb-4fd7-a4b6-8520d6a81df1.htm IN is an operator!</description><pubDate>Thu, 07 Jan 2010 20:28:46 GMT</pubDate><dc:creator>Clive Chinery</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>Don't let anyone here intimidate you. Sometimes they forget that they too had to start someplace. It was a good question, just a bit of a formatting issue maybe.</description><pubDate>Thu, 07 Jan 2010 18:32:55 GMT</pubDate><dc:creator>sjimmo</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>[quote]SSSoliceIn light of all the confusion, I respectfully apologize to everyone for not making the question more clear in the first place. [/quote]1.  Do NOT take the belittling comments to heart 2.  Do NOT feel bad 3   Do NOT stop submitting QODs... Goodness knows I have been banged from pillar to post, hopefully you will have learned from this, (I take it this was your first QOD),  and your next attempt will be composed keeping in mind all the nit picking that it might be subjected to.</description><pubDate>Thu, 07 Jan 2010 18:06:22 GMT</pubDate><dc:creator>bitbucket-25253</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>Doh! It's fixed. I must have made a mistake when I changed the question.It now shows predicate as the answer. I'll fix points.</description><pubDate>Thu, 07 Jan 2010 15:32:42 GMT</pubDate><dc:creator>Steve Jones - SSC Editor</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>In light of all the confusion, I respectfully apologize to everyone for not making the question more clear in the first place.:blush:</description><pubDate>Thu, 07 Jan 2010 15:05:34 GMT</pubDate><dc:creator>SSSolice</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>[quote][b]Scott Duncan-251680 (1/7/2010)[/b][hr][quote][b]Jeff Cook-476310 (1/7/2010)[/b][hr]I'm not sure what is going on but when I went to http://www.sqlservercentral.com/questions/T-SQL/68500/and answered predicate (to the revised question), the site said:Sorry - you were wrong[b]Correct answer: 	Operator[/b]Explanation: In T-SQL, a PREDICATE allows you to check whether a value or scalar expression evaluates to TRUE, FALSE, or UNKNOWN. The IN clause, with column and values becomes a predicate and checks to see if at least one of the elements in a set is equal to a given value or expression.T-SQL PREDICATE: http://msdn.microsoft.com/en-us/library/ms189523%28SQL.90%29.aspxJoin the discussion about this questionContribute a question of your own[/quote]Ditto - I chose predicate.  Even more confusing when I was reading through the comments (thinking "but IN isn't by itself - the whole statement will resolve to TRUE, FALSE or UNKNOWN") until I got to this post and realised the question had been altered - although not the answer it would appear.[/quote]Same here - was a bit surprised to see Operator as the correct answer when it seemed Predicate was right.  Then to be told in the explanation that predicate is correct left me completely confused.  Glad to see that I'm not the only one!</description><pubDate>Thu, 07 Jan 2010 14:56:46 GMT</pubDate><dc:creator>Rick Townsend</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>[quote][b]Jeff Cook-476310 (1/7/2010)[/b][hr]I'm not sure what is going on but when I went to http://www.sqlservercentral.com/questions/T-SQL/68500/and answered predicate (to the revised question), the site said:Sorry - you were wrong[b]Correct answer: 	Operator[/b]Explanation: In T-SQL, a PREDICATE allows you to check whether a value or scalar expression evaluates to TRUE, FALSE, or UNKNOWN. The IN clause, with column and values becomes a predicate and checks to see if at least one of the elements in a set is equal to a given value or expression.T-SQL PREDICATE: http://msdn.microsoft.com/en-us/library/ms189523%28SQL.90%29.aspxJoin the discussion about this questionContribute a question of your own[/quote]Ditto - I chose predicate.  Even more confusing when I was reading through the comments (thinking "but IN isn't by itself - the whole statement will resolve to TRUE, FALSE or UNKNOWN") until I got to this post and realised the question had been altered - although not the answer it would appear.</description><pubDate>Thu, 07 Jan 2010 14:35:23 GMT</pubDate><dc:creator>thecosmictrickster@gmail.com</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>[quote][b]Steve Jones - Editor (1/7/2010)[/b][hr]the answer is predicate. It has not changed. The change from "IN"to "columnX IN (x, y, z, ...)"Makes it a predicate.[/quote]Maybe you should check it again Steve. I checked Predicate less than 10 minutes ago and got it wrong.</description><pubDate>Thu, 07 Jan 2010 13:36:14 GMT</pubDate><dc:creator>Tom Garth</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>I'm not sure what is going on but when I went to http://www.sqlservercentral.com/questions/T-SQL/68500/and answered predicate (to the revised question), the site said:Sorry - you were wrong[b]Correct answer: 	Operator[/b]Explanation: In T-SQL, a PREDICATE allows you to check whether a value or scalar expression evaluates to TRUE, FALSE, or UNKNOWN. The IN clause, with column and values becomes a predicate and checks to see if at least one of the elements in a set is equal to a given value or expression.T-SQL PREDICATE: http://msdn.microsoft.com/en-us/library/ms189523%28SQL.90%29.aspxJoin the discussion about this questionContribute a question of your own</description><pubDate>Thu, 07 Jan 2010 13:21:37 GMT</pubDate><dc:creator>Jeff Cook-476310</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>the answer is predicate. It has not changed. The change from "IN"to "columnX IN (x, y, z, ...)"Makes it a predicate.</description><pubDate>Thu, 07 Jan 2010 13:10:57 GMT</pubDate><dc:creator>Steve Jones - SSC Editor</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>Now it's even more confusing - the question has changed; the answer has changed from predicate to operator which I don't think is correct with the new question; and, the explanation still lists predicate as the correct answer!</description><pubDate>Thu, 07 Jan 2010 13:04:16 GMT</pubDate><dc:creator>Jeff Cook-476310</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>[quote][b]Steve Jones - Editor (1/7/2010)[/b][hr]I see both sides in this argument. BOL is inconsistent and I have added feedback to that note to various links to have this clarified at the source we use. When I got the QOD and followed the link, Predicate seemed correct. However the more I look at the wording, I can see where operator is a valid argument. My first thought was operator as well, but then I thought it's in the WHERE clause, so predicate made sense.I have changed the question to include "in (z, y, z, ...)" as the "what is this" portion, which should clear up confusion as to this being a predicate.I will award back all points to date to people once my password gets reset :) Forgot it over the holidays. :hehe:[/quote]Thanks Steve.</description><pubDate>Thu, 07 Jan 2010 09:19:39 GMT</pubDate><dc:creator>SQLRNNR</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>Think this would have been a better question if it had been multiple checkboxes.Kind of like + is aA. Addition OperatorB. Concatenation OperatorC. Mathematical SymbolD. The fifth letter of the English alphabetAnd only letting you pick one answer.  ;)</description><pubDate>Thu, 07 Jan 2010 09:18:10 GMT</pubDate><dc:creator>mtassin</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>good point, Christian. I've added in the column to the question.</description><pubDate>Thu, 07 Jan 2010 09:17:19 GMT</pubDate><dc:creator>Steve Jones - SSC Editor</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>Ok, my turn now.  I answered operator as well and got it wrong.  Being the first one to respond to the thread - I didn't want to beat the author up (and give away the answer too soon) over it.  I was trying to play nicely since he had gumption to submit a QOD in the first place.</description><pubDate>Thu, 07 Jan 2010 09:14:49 GMT</pubDate><dc:creator>SQLRNNR</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>Hm this is still not correct - and even more important - I made an error myself - the IN clause is not only the list of values, it also includes the operator itself.Example:[code]columna IN (1,2,3)[/code]Predicate: [quote]columna IN (1,2,3)[/quote]IN (logical) clause: [quote]IN (1,2,3)[/quote]IN operator: [quote]IN[/quote]</description><pubDate>Thu, 07 Jan 2010 09:12:30 GMT</pubDate><dc:creator>Christian Buettner-167247</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>I see both sides in this argument. BOL is inconsistent and I have added feedback to that note to various links to have this clarified at the source we use. When I got the QOD and followed the link, Predicate seemed correct. However the more I look at the wording, I can see where operator is a valid argument. My first thought was operator as well, but then I thought it's in the WHERE clause, so predicate made sense.I have changed the question to include "in (z, y, z, ...)" as the "what is this" portion, which should clear up confusion as to this being a predicate.I will award back all points to date to people once my password gets reset :) Forgot it over the holidays. :hehe:</description><pubDate>Thu, 07 Jan 2010 08:47:57 GMT</pubDate><dc:creator>Steve Jones - SSC Editor</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>Well W3 considers it an operator.http://www.w3schools.com/sql/sql_in.aspBut I could also see the case that you have an IN clause with the IN operator and the results of that clause are the IN predicate.</description><pubDate>Thu, 07 Jan 2010 08:38:56 GMT</pubDate><dc:creator>mtassin</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>CB - You are correct, but the question generically asked what the "IN" is considered in a T-SQL statement. There were no examples or conditions qualifying the question.Based upon that, the answer would have to be either predicate or operator.     </description><pubDate>Thu, 07 Jan 2010 07:52:42 GMT</pubDate><dc:creator>sjimmo</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>Sorry, but "IN" standalone is [b]not[/b] a predicate, especially in the case where you have to decide between answers [b]operator[/b] and [b]predicate[/b]. Explanations (and distinctions between the terms) were given above - please take the time to read them carefully.</description><pubDate>Thu, 07 Jan 2010 07:48:18 GMT</pubDate><dc:creator>Christian Buettner-167247</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>Good question.  I thought its an operator.  But, after some googling found though it could be called an operator but would be considered in [b]Predicate[/b]. Predicate (Transact-SQL)Is an expression that evaluates to TRUE, FALSE, or UNKNOWN. Predicates are used in the search condition of [b]WHERE [/b]clauses and [b]HAVING [/b]clauses, the join conditions of [b]FROM [/b]clauses, and other constructs where a Boolean value is required.</description><pubDate>Thu, 07 Jan 2010 07:38:47 GMT</pubDate><dc:creator>SanjayAttray</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>I am with those who want points for picking "Operator." This is merely anecdotal, but I visualized replacing IN with = or &amp;gt; and it seems like they all serve the same type of purpose - to compare values on either side. Or to phrase my point-grubbing in SQL befitting the QOTD:INSERT INTO webrunner_account (QOTD_Points)SELECT PointsFROM QuestionWHERE Question = 'T-SQL/68500/'AND Answer IN ('Predicate','Operator') Or something like that. :-)- webrunner</description><pubDate>Thu, 07 Jan 2010 07:36:34 GMT</pubDate><dc:creator>webrunner</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>This QOD actually has 2 answers that are correct, and should reflect such.The "IN" statement can be used as both a predicate and an operator. See BOL:Logical OperatorIN - TRUE if the operand is equal to one of a list of expressions. Predicate:Is an expression that evaluates to TRUE, FALSE, or UNKNOWN. Predicates are used in the search condition of WHERE clauses and HAVING clauses, the join conditions of FROM clauses, and other constructs where a Boolean value is required.Thus, with the answers set up the way that they are, with only one answer being selectable, we should get credit for either answer being correct.</description><pubDate>Thu, 07 Jan 2010 07:34:56 GMT</pubDate><dc:creator>sjimmo</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>[quote][b]Dave62 (1/7/2010)[/b][hr]I can understand the confusion with this question since msdn refers to IN many different ways.  A number of msdn links have already been posted to defend different answers and here is another one.http://msdn.microsoft.com/en-us/library/ms177682.aspxIn the remarks section the first sentence refers to IN as a clause.  "...values (many thousands) in an [b]IN clause[/b] can..."Also, the article referenced is specifically for IN (Transact-SQL) not predicates or logical operators.Dave[/quote]Well yet another term - see here for details with regards to the "logical" IN clause.http://www.articleworld.org/index.php/Clause_%28logic%29Edit: Just to provide an example, the IN clause in predicateEdit2: added operator to IN clause[quote]fieldx IN (1,2,3)[/quote]is[quote]IN (1,2,3)[/quote]Not to mix up with "grammar" clauses like the SELECT or FROM clause.</description><pubDate>Thu, 07 Jan 2010 07:00:38 GMT</pubDate><dc:creator>Christian Buettner-167247</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>hai</description><pubDate>Thu, 07 Jan 2010 06:58:59 GMT</pubDate><dc:creator>subha.msc2007</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>As one who has been beaten from pillar to post during the discussion of QOD's that I have submitted and which where published ... I am sorry to say that I do not think the author of this QOD performed due diligence in their search for the justification of the supposed correct answer.But my thoughts do not change the outcome, the only individual empowered to do that is Steve Jones.Hence let's ask Steve Jones to ajudicate.</description><pubDate>Thu, 07 Jan 2010 06:46:07 GMT</pubDate><dc:creator>bitbucket-25253</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>Somehow I had the feeling this question would have a controversial "correct" answer because it was just too obvious that it should be "Operator".</description><pubDate>Thu, 07 Jan 2010 06:37:22 GMT</pubDate><dc:creator>David Harder</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>I can understand the confusion with this question since msdn refers to IN many different ways.  A number of msdn links have already been posted to defend different answers and here is another one.http://msdn.microsoft.com/en-us/library/ms177682.aspxIn the remarks section the first sentence refers to IN as a clause.  "...values (many thousands) in an [b]IN clause[/b] can..."Also, the article referenced is specifically for IN (Transact-SQL) not predicates or logical operators.Dave</description><pubDate>Thu, 07 Jan 2010 06:30:23 GMT</pubDate><dc:creator>Dave62</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>I'll chime in as well to say that IN is an operator. See BOL for list of Logical Operatorshttp://msdn.microsoft.com/en-us/library/ms189773(SQL.90).aspx</description><pubDate>Thu, 07 Jan 2010 05:52:19 GMT</pubDate><dc:creator>Noel McKinney</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>Allow me to jump on the bandwagon here and say that 'IN' by itself is a logical operator.  'SomeField IN ( 1, 2, 3 )' would be considered a predicate, but by itself, 'IN' does not evaluate to TRUE, FALSE, or UNKNOWN.</description><pubDate>Thu, 07 Jan 2010 05:46:23 GMT</pubDate><dc:creator>Julie Hargraves</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>I answered 'Operator' - And guess what, I got it wrong. :w00t:I agree with all the above members, 'IN' is an operator.</description><pubDate>Thu, 07 Jan 2010 04:41:21 GMT</pubDate><dc:creator>Bhavesh_Patel</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>Answer is : Operator Predicate Is an expression that evaluates to TRUE, FALSE, or UNKNOWN. Predicates are used in the search condition of WHERE clauses and HAVING clauses, the join conditions of FROM clauses, and other constructs where a Boolean value is required.IN is the logical operator Please visit the below one to know all the logical operator http://msdn.microsoft.com/en-us/library/ms189773.aspx</description><pubDate>Thu, 07 Jan 2010 04:27:15 GMT</pubDate><dc:creator>chenthilar</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>Agree with Christian Buettner ... IN is the operator used in the predicate.</description><pubDate>Thu, 07 Jan 2010 02:44:38 GMT</pubDate><dc:creator>Muhammad Haseeb Farhan</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>I agree with the previous posts. A little more justification for the answer please. Also, I'm sure that I've seen my execution plans changeWHERE colA IN(1)intoWHERE colA=1and WHERE colA IN(1,2,3)intoWHERE colA=1 OR colA=2 OR colA=3Though to be honest, I can't replicate that right now. I might have seen it running a trace at some point.It does highlight how SQL tests a value in 2 columns though:WHERE 1 in(colA,colB)turns intoWHERE 1=colA OR 1=colB</description><pubDate>Thu, 07 Jan 2010 02:41:58 GMT</pubDate><dc:creator>chriscoates</dc:creator></item><item><title>RE: T-SQL</title><link>http://www.sqlservercentral.com/Forums/Topic843310-2582-1.aspx</link><description>Agree with previous posts.IN, like all logical operators, must form part of an expression.A predicate may comprise one or more logical operators (albeit in a join or where)</description><pubDate>Thu, 07 Jan 2010 01:52:11 GMT</pubDate><dc:creator>Stewart "Arturius" Campbell</dc:creator></item></channel></rss>