Sql Server Why Is This Java Query Failing Returning 0

Sql Server Why Is This Java Query Failing Returning 0