SELECT COUNT(*) AS Expr1 FROM JobReport WHERE (gcode = @gcode) AND (autoinput = 1) AND (uid = @uid) AND (pdate = @pdate)