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

Bug: Enter A Text Which Is A Mysql Function

forums forums SQLyog SQLyog: Bugs / Feature Requests Bug: Enter A Text Which Is A Mysql Function

  • This topic is empty.
Viewing 3 reply threads
  • Author
    Posts
    • #10600
      uyuni
      Member

      I'd like to enter the following text into a field with type “text”:

      concat(a, b )

      SQLYog obviously tries to write this without quotes and then I get the error that column a does not exist!

      Emilio

    • #25183
      peterlaursen
      Participant

      This is to my best understanding not a bug!

      The concat() functions takes strings as arguments! Unless they are string columns or declared variables inside a stored program (stored procedure, function, trigger etc), a and b will not be recognized as strings by the server.

      The error message is sent from the server and would be the same with any client.

      Why don't you write concat('a','b')? What point am I missing?

    • #25184
      peterlaursen
      Participant

      ok .. a colleague told me that I probably misunderstood!

      Please read: http://webyog.com/faq/8_116_en.html

      If 'smart keywords' is turned ON in 'preferences' SQLyog will try to evaluate the function!

      Two ways to avoid

      1) Turn smart keywords OFF.

      2) use `backticks`around the string like `concat(a, b )` and it will be considered a literal and not a function that should be evaluated

    • #25185
      uyuni
      Member

      That's it.

      Thank you.

      Emilio

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