I need to execute a simple sql query on sql server database with ODBC. The sql code is below:

```
insert into mylogint
EXEC(
'select count(*) from mymessage'
)

```

mylogint is a simple table:

```
create table mylogint
(value int)

```

But sometimes I found that table mylogint is empty, because count(*) returned NULL when the ODBC connected a sql server instance. I mean that the count(*) returned NULL rather than int, and I'm sure that mymessage isn't empty. I found that the count(\*) returned NULL on some sql instances, returned int on other instances.

Do you know why count(\*) returned NULL in this case? What's the possible reason? Thanks.