3 Replies Latest reply: May 11, 2012 5:20 AM by Ferran Salcedo Sicilia RSS

    Why these two expressions do not give the same results

      Hello everyone,
      We are experiencing an odd problem using two expressions which in theory they should have to give us the same result.
      Let's say that we have a table of transactions, which has a column names transaction_id and other named issue_completed which can be null, true or false.
      All the transactions of these table have NULL to the issue_completed field.
      Then the expressions:
      COUNT(IF(issue_completed='true', transaction_id)) results in 0
      COUNT({<issue_completed={'true'}}>}transaction_id) results in 22993 which is the number of transactions of the table.

      Anyone could tell me why of these results?

      Thanks in advance,