simple explanation please

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jay

    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


  • John Bell

    #2
    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.c om> wrote in message
    news:6bNud.2446 6$9A.478513@new s.xtra.co.nz...[color=blue]
    > 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
    >[/color]


    Comment

    • Jay

      #3
      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...[color=blue]
      > 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.c om> wrote in message
      > news:6bNud.2446 6$9A.478513@new s.xtra.co.nz...[color=green]
      >> 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
      >>[/color]
      >
      >[/color]


      Comment

      • Hugo Kornelis

        #4
        Re: simple explanation please

        On Sun, 12 Dec 2004 14:30:39 +1300, Jay wrote:
        [color=blue]
        >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
        >[/color]

        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)

        Comment

        • John Bell

          #5
          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_expressi on [ NOT ] LIKE string_expressi on
          [ ESCAPE 'escape_charact er' ]
          | expression [ NOT ] BETWEEN expression AND expression
          | expression IS [ NOT ] NULL
          | CONTAINS
          ( { column | * } , '< contains_search _condition >' )
          | FREETEXT ( { column | * } , 'freetext_strin g' )
          | expression [ NOT ] IN ( subquery | expression [ ,...n ] )
          | expression { = | < > | ! = | > | > = | ! > | < | < = | ! < }
          { ALL | SOME | ANY} ( subquery )
          | EXISTS ( subquery )

          John


          "Jay" <nospam@*here.c om> wrote in message
          news:zf9vd.2528 5$9A.491217@new s.xtra.co.nz...[color=blue]
          > 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...[color=green]
          >> 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.c om> wrote in message
          >> news:6bNud.2446 6$9A.478513@new s.xtra.co.nz...[color=darkred]
          >>> 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
          >>>[/color]
          >>
          >>[/color]
          >
          >[/color]


          Comment

          • Jay

            #6
            Re: simple explanation please


            "Hugo Kornelis" <hugo@pe_NO_rFa ct.in_SPAM_fo> wrote in message
            news:qjjqr01467 117tn8nebpjfsa3 3jop07r62@4ax.c om...[color=blue]
            > On Sun, 12 Dec 2004 14:30:39 +1300, Jay wrote:
            >[color=green]
            >>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
            >>[/color]
            >
            > 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[/color]


            Ahh many thanks Hugo,
            Now I see the light.

            Jay


            Comment

            Working...