Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Data Search Bug

forums forums SQLyog SQLyog: Bugs / Feature Requests Data Search Bug

  • This topic is empty.
Viewing 5 reply threads
  • Author
    Posts
    • #12557

      I have a table with varchar columns that contain strings with a leading and trailing hyphen, e.g. -OMeO-. When I use Data Search it incorrectly finds this string in every row. Searching for -OMeO- works properly.

      Even weirder things happen when I go looking for them: searching for this: -OMeO- x is equivalent to searching for this: x.

    • #33011
      peterlaursen
      Participant

      “-” is a 'minus- operator working similar to same in Google advanced search. Data Sync is per design 'google search for databases'. DO NOT think SQL when using it!.

      Program documentation:

      “Also the '+' and '-' operators are supported. +string or +”some string” will not append a '%'-wildcard to the ends of the specified search string. So '+' is an exact match with the search string you specified. For instance +mysql will find rows where a column exactly matches 'mysql' – and not 'mysql server' for instance. '-' behaves like '+' except that the LIKE clause will be replaced with a NOT LIKE clause. Note that '+' and '-' only work as operators when they have no whitespace to their right. +lion will find exact matches on 'lion' whilst + lion will find rows where there are fuzzy matches on BOTH 'lion' AND '+' in same columns of the database objects searched.”

      Release Blogs:

      http://www.webyog.co…our-finger-tips

      http://www.webyog.co…d-in-sqlyog-9-2

      If this does not explain what you see please elaborate your case (table structure, INSERT statements, screenshots). I do not fully understand.

      Please also ensure that you have read the paragraph on Data Search in program documentation (help .. help menu).

    • #33012
      peterlaursen
      Participant

      To suppres “-” being interpreted as an operator quote the search string like “-OMeO-“ or just search on OMeO (if I understand the problem).

    • #33013
      peterlaursen
      Participant

      In other words

      searching on “-OMeO-” (without quotes) will generate a WHERE clause like “.. WHERE column NOT LIKE '%OMeO-%”

    • #33014
      'peterlaursen' wrote:

      To suppres “-” being interpreted as an operator quote the search string like “-OMeO-“ or just search on OMeO (if I understand the problem).

      Ah, that explains it. My mistake. I read this, then stopped reading: “After entering some text in the text-box, click 'Search' or push enter. SQLyog will find all data that matches the search string entered.”

      I admit this is clearly a case of RTFM, but might I suggest some clue on that first help page, or better still on the Data Search tab itself, that what you type is not necessarily what you'll find? Even something as perplexing as “DO NOT think SQL when using it!” might help.

      Many thanks,

      /Steve

    • #33015
      peterlaursen
      Participant

      A cotrrection: actually when using + and – operators we don't attach wildcards to the end of the string, so the WHERE clause would be “.. WHERE column NOT LIKE 'OMeO-'”

Viewing 5 reply threads
  • You must be logged in to reply to this topic.