whats wrong with this syntax

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

    #1

    whats wrong with this syntax

    Hi

    i have query

    SELECT * FROM stat WHERE host LIKE "uncp%" AND remotehost NOT REGEXP
    "looksmart" AND datetime REGEXP '^........17.*' ;

    and it works as have to
    but when i try to complicate:

    SELECT * FROM stat WHERE host LIKE "uncp%" AND remotehost NOT REGEXP
    "looksmart | googlebot" AND datetime REGEXP '^........17.*' ;

    or

    SELECT * FROM stat WHERE host LIKE "uncp%" AND remotehost NOT REGEXP
    "(.*looksmart.* ) | (.*googlebot.*) " AND datetime REGEXP '^........17.*' ;

    rezult comes with all rows i want to exclude by REGEXP

    anyone knows what is right syntax to exclude rows that have several
    posible unwanted subsrings?

Working...