Unix Technical Forum

simple explanation please

This is a discussion on simple explanation please within the SQL Server forums, part of the Microsoft SQL Server category; --> PREDICATES Used as a clause. A. What does PREDICATES mean? B. What does it mean when used in a ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-29-2008, 06:11 AM
Jay
 
Posts: n/a
Default simple explanation please

PREDICATES

Used as a clause.
A. What does PREDICATES mean?
B. What does it mean when used in a where clause?

I checked BOL (Glossary) but get no explanation there.

Thanks
Jay


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-29-2008, 06:11 AM
John Bell
 
Posts: n/a
Default Re: simple explanation please

Hi

You need to check the index!
Predicate
Is an expression that evaluates to TRUE, FALSE, or UNKNOWN. Predicates are
used in the search condition of WHERE clauses and HAVING clauses, and the
join conditions of FROM clauses.

John

"Jay" <nospam@*here.com> wrote in message
news:6bNud.24466$9A.478513@news.xtra.co.nz...
> PREDICATES
>
> Used as a clause.
> A. What does PREDICATES mean?
> B. What does it mean when used in a where clause?
>
> I checked BOL (Glossary) but get no explanation there.
>
> Thanks
> Jay
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-29-2008, 06:11 AM
Jay
 
Posts: n/a
Default Re: simple explanation please

Thanks... I should have said that I found it in BOL but came away none the
wiser.
OK so it's T/F or Unknown.... but what is it?

Jay

"John Bell" <jbellnewsposts@hotmail.com> wrote in message
news:41bc2523$0$7542$afc38c87@news.easynet.co.uk.. .
> Hi
>
> You need to check the index!
> Predicate
> Is an expression that evaluates to TRUE, FALSE, or UNKNOWN. Predicates are
> used in the search condition of WHERE clauses and HAVING clauses, and the
> join conditions of FROM clauses.
>
> John
>
> "Jay" <nospam@*here.com> wrote in message
> news:6bNud.24466$9A.478513@news.xtra.co.nz...
>> PREDICATES
>>
>> Used as a clause.
>> A. What does PREDICATES mean?
>> B. What does it mean when used in a where clause?
>>
>> I checked BOL (Glossary) but get no explanation there.
>>
>> Thanks
>> Jay
>>

>
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-29-2008, 06:11 AM
Hugo Kornelis
 
Posts: n/a
Default Re: simple explanation please

On Sun, 12 Dec 2004 14:30:39 +1300, Jay wrote:

>PREDICATES
>
>Used as a clause.
>A. What does PREDICATES mean?
>B. What does it mean when used in a where clause?
>
>I checked BOL (Glossary) but get no explanation there.
>
>Thanks
>Jay
>


Hi Jay,

You can't use the literal "PREDICATES" in a WHERE clause (or aywhere elses
in a query). Instead, predicate is the name given to all expression that
evaluate to true, false or unknown (as opposed to non-predicate
expressions that evaluate to an integer value, a string, a datetime value,
etc.)

Examples of predicates are
fname LIKE 'Ja%'
ytd_sales > 4095 AND ytd_sales < 12000
AVG(price) > 10.95
EXISTS (insert subquery here)


Best, Hugo
--

(Remove _NO_ and _SPAM_ to get my e-mail address)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-29-2008, 06:11 AM
John Bell
 
Posts: n/a
Default Re: simple explanation please

Hi Jay

It is an expression which is also in the BOL index, but the topic "Search
Conditions" is probably the best example for predicates

< predicate > ::=
{ expression { = | < > | ! = | > | > = | ! > | < | < = | ! < }
expression
| string_expression [ NOT ] LIKE string_expression
[ ESCAPE 'escape_character' ]
| expression [ NOT ] BETWEEN expression AND expression
| expression IS [ NOT ] NULL
| CONTAINS
( { column | * } , '< contains_search_condition >' )
| FREETEXT ( { column | * } , 'freetext_string' )
| expression [ NOT ] IN ( subquery | expression [ ,...n ] )
| expression { = | < > | ! = | > | > = | ! > | < | < = | ! < }
{ ALL | SOME | ANY} ( subquery )
| EXISTS ( subquery )

John


"Jay" <nospam@*here.com> wrote in message
news:zf9vd.25285$9A.491217@news.xtra.co.nz...
> Thanks... I should have said that I found it in BOL but came away none the
> wiser.
> OK so it's T/F or Unknown.... but what is it?
>
> Jay
>
> "John Bell" <jbellnewsposts@hotmail.com> wrote in message
> news:41bc2523$0$7542$afc38c87@news.easynet.co.uk.. .
>> Hi
>>
>> You need to check the index!
>> Predicate
>> Is an expression that evaluates to TRUE, FALSE, or UNKNOWN. Predicates
>> are used in the search condition of WHERE clauses and HAVING clauses, and
>> the join conditions of FROM clauses.
>>
>> John
>>
>> "Jay" <nospam@*here.com> wrote in message
>> news:6bNud.24466$9A.478513@news.xtra.co.nz...
>>> PREDICATES
>>>
>>> Used as a clause.
>>> A. What does PREDICATES mean?
>>> B. What does it mean when used in a where clause?
>>>
>>> I checked BOL (Glossary) but get no explanation there.
>>>
>>> Thanks
>>> Jay
>>>

>>
>>

>
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-29-2008, 06:16 AM
Jay
 
Posts: n/a
Default Re: simple explanation please


"Hugo Kornelis" <hugo@pe_NO_rFact.in_SPAM_fo> wrote in message
news:qjjqr01467117tn8nebpjfsa33jop07r62@4ax.com...
> On Sun, 12 Dec 2004 14:30:39 +1300, Jay wrote:
>
>>PREDICATES
>>
>>Used as a clause.
>>A. What does PREDICATES mean?
>>B. What does it mean when used in a where clause?
>>
>>I checked BOL (Glossary) but get no explanation there.
>>
>>Thanks
>>Jay
>>

>
> Hi Jay,
>
> You can't use the literal "PREDICATES" in a WHERE clause (or aywhere elses
> in a query). Instead, predicate is the name given to all expression that
> evaluate to true, false or unknown (as opposed to non-predicate
> expressions that evaluate to an integer value, a string, a datetime value,
> etc.)
>
> Examples of predicates are
> fname LIKE 'Ja%'
> ytd_sales > 4095 AND ytd_sales < 12000
> AVG(price) > 10.95
> EXISTS (insert subquery here)
>
>
> Best, Hugo



Ahh many thanks Hugo,
Now I see the light.

Jay


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:33 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com