4 Replies Latest reply on May 12, 2006 6:59 AM by paross1

    sql error

    richy2424
      Hi i have just changed my database from access to mysql, there is just one error i have

      could someone tell me why this is any how i could fix this

      many thanks

      the error is
      Error Executing Database Query. FUNCTION cricketstats.SUM does not exist
        • 1. sql error
          paross1 Level 2
          Just off of the top of my head I would say that you would need to convert all of your IIF statements to CASE statements, as I don't believe that you can use IIF in MySQL. I don't use MySQL myself, but I think that the attachment is close to using the correct syntax. Also, I believe that MySQL has an IF(expr1,expr2,expr3) flow control function as well, where If expr1 is TRUE (expr1 <> 0 and expr1 <> NULL) then IF() returns expr2; otherwise it returns expr3. IF() returns a numeric or string value, depending on the context in which it is used.

          Phil
          • 2. sql error
            richy2424 Level 1
            Hi thanks for that, i also get an error with the count and sum functions

            the error i get is FUNCTION sum does not exist

            is there any emaples of sql code and normal code?

            • 3. Re: sql error
              paross1 Level 2
              What version of MySQL are you using? Any version older than 4.1 did not support subqueries/subselects.

              Phil
              • 4. Re: sql error
                paross1 Level 2
                What kind of errors do you get when you run this?

                Phil