Whats wrong with the WHERE clause in this query?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • RayYates
    Developer Partner



    • Dec 2006
    • 1517

    #1

    Whats wrong with the WHERE clause in this query?

    Whats wrong with the WHERE clause in this query? Note: I think it works on MySQL and fails on Maria db.

    Code:
    SELECT CONCAT_WS( ' ', code, descrip ) AS search_string
    FROM s01_Products 
    WHERE search_string LIKE '%ceil%'
    Ray Yates
    "If I have seen further, it is by standing on the shoulders of giants."
    --- Sir Isaac Newton
  • burch
    Administrator

    • Mar 2009
    • 630

    #2
    It doesn't work for me in MySQL 4.1.22 or 5.5.33, but this query will:

    Code:
    SELECT * FROM ( SELECT CONCAT_WS( ' ', code, descrip ) AS search_string FROM s01_Products ) a WHERE search_string LIKE '%ceil%';

    Comment

    • RayYates
      Developer Partner



      • Dec 2006
      • 1517

      #3
      Thx
      Ray Yates
      "If I have seen further, it is by standing on the shoulders of giants."
      --- Sir Isaac Newton

      Comment

      Working...
      X