Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12345»»»

T-SQL Expand / Collapse
Author
Message
Posted Thursday, January 7, 2010 4:27 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, April 20, 2010 6:15 AM
Points: 5, Visits: 104
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
Post #843426
Posted Thursday, January 7, 2010 4:41 AM


SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Friday, January 11, 2013 12:41 PM
Points: 621, Visits: 297
I answered 'Operator' - And guess what, I got it wrong.

I agree with all the above members, 'IN' is an operator.




Bhavesh Patel

http://bhaveshgpatel.wordpress.com/
Post #843432
Posted Thursday, January 7, 2010 5:46 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Thursday, September 25, 2014 1:32 PM
Points: 3,021, Visits: 461
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.
Post #843456
Posted Thursday, January 7, 2010 5:52 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Tuesday, February 11, 2014 4:12 PM
Points: 2,007, Visits: 768
I'll chime in as well to say that IN is an operator. See BOL for list of Logical Operators

http://msdn.microsoft.com/en-us/library/ms189773(SQL.90).aspx
Post #843457
Posted Thursday, January 7, 2010 6:30 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 12:55 PM
Points: 2,178, Visits: 2,172
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.aspx

In the remarks section the first sentence refers to IN as a clause. "...values (many thousands) in an IN clause can..."

Also, the article referenced is specifically for IN (Transact-SQL) not predicates or logical operators.

Dave
Post #843472
Posted Thursday, January 7, 2010 6:37 AM
SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Friday, December 12, 2014 7:23 AM
Points: 4,113, Visits: 1,231
Somehow I had the feeling this question would have a controversial "correct" answer because it was just too obvious that it should be "Operator".
Post #843474
Posted Thursday, January 7, 2010 6:46 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Thursday, November 6, 2014 1:00 PM
Points: 5,333, Visits: 25,277
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.


If everything seems to be going well, you have obviously overlooked something.

Ron

Please help us, help you -before posting a question please read

Before posting a performance problem please read
Post #843479
Posted Thursday, January 7, 2010 6:58 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Wednesday, April 16, 2014 11:33 PM
Points: 99, Visits: 134
hai
Post #843499
Posted Thursday, January 7, 2010 7:00 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Tuesday, October 7, 2014 2:56 AM
Points: 2,842, Visits: 3,876
Dave62 (1/7/2010)
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.aspx

In the remarks section the first sentence refers to IN as a clause. "...values (many thousands) in an IN clause can..."

Also, the article referenced is specifically for IN (Transact-SQL) not predicates or logical operators.

Dave


Well yet another term - see here for details with regards to the "logical" IN clause.
http://www.articleworld.org/index.php/Clause_%28logic%29
Edit: Just to provide an example, the IN clause in predicate
Edit2: added operator to IN clause
fieldx IN (1,2,3)
is
IN (1,2,3)


Not to mix up with "grammar" clauses like the SELECT or FROM clause.


Best Regards,
Chris Büttner
Post #843502
Posted Thursday, January 7, 2010 7:34 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, December 3, 2014 8:17 AM
Points: 2,917, Visits: 2,537
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 Operator
IN - 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.


Steve Jimmo
Sr DBA
“If we ever forget that we are One Nation Under God, then we will be a Nation gone under." - Ronald Reagan
Post #843539
« Prev Topic | Next Topic »

Add to briefcase ««12345»»»

Permissions Expand / Collapse