• Try as I said above. yeha I alwsys found issue with this.

    SO what I do is always alias the column name .....Now Upper and lower case also makes difference...

    Here do this.....Lets say your variable name is @MyCount

    Then

    SELECT ISNULL(COUNT(*), 0) as MyCount from Table .........

    and in the resultset map the vraibale to MyCount ( make sure you type exactly what your alias is..so in this case MyCount)