4 Replies Latest reply: Jun 8, 2010 8:56 AM by jalldridge RSS

    Issue with counting true / false values


      Hi All,

      I'm trying to do a basic count but am having some issues which I cant seem to resolve.

      As part of my data load I read in a number of fields inc identifier and also addrarchive.

      identifer is a varchar in sql server and addrarchive is a bit (hence stored as true or false).

      I'm using the following expression

      count(if(addrarchive='false', identifier))

      but this give me no results (doing an sql query I know that it should give me178!!!

      I've tried various different things for addrarchive i..e. -1 etc but no joys.

      If anybody can help out with this simple thing it would be greatly appreciated!