# ISNULL does not support operand types

**URL:** https://community.dremio.com/t/isnull-does-not-support-operand-types/2084
**Category:** Uncategorized
**Created:** [October 25, 2018, 8:44am UTC](https://community.dremio.com/t/isnull-does-not-support-operand-types/2084 "2018-10-25T08:44:02Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![ahmadimt](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/ahmadimt/32/856_2.png) [@ahmadimt](https://community.dremio.com/u/ahmadimt)
#### Post date: [October 25, 2018, 8:44am UTC](https://community.dremio.com/t/isnull-does-not-support-operand-types/2084/1 "2018-10-25T08:44:02Z")

</div>

I am getting this error when trying to execute query with `isnull()` function against MS SQL server.  
For example, In case of `isnull(r.mentions ,0) mentions` I am getting `ISNULL does not support operand types (DOUBLE,INTEGER)` In case of `VARCHAR` type `ISNULL does not support operand types (VARCHAR,VARCHAR)`. I was wondering if is there any equivalent function present in Dremio or do we have any workaround for that.

---

<div class="post-metadata">

### Author: ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)
#### Post date: [November 2, 2018, 4:56am UTC](https://community.dremio.com/t/isnull-does-not-support-operand-types/2084/2 "2018-11-02T04:56:07Z")

</div>

@ahmadimt

What’s your query? Would you be able to share the profile?

[How To Share A Query Profile](https://www.dremio.com/tutorials/share-query-profile-dremio/)

---

<div class="post-metadata">

### Author: ![jharrington](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@jharrington](https://community.dremio.com/u/jharrington)
#### Post date: [July 22, 2019, 10:12am UTC](https://community.dremio.com/t/isnull-does-not-support-operand-types/2084/3 "2019-07-22T10:12:40Z")

</div>

I’m getting a similar error:

" ISNULL does not support operand types (TIMESTAMP,TIMESTAMP)"

I can share the profile privately if required.

---

<div class="post-metadata">

### Author: ![laurent](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/laurent/32/16_2.png) [@laurent](https://community.dremio.com/u/laurent)
#### Post date: [July 22, 2019, 4:59pm UTC](https://community.dremio.com/t/isnull-does-not-support-operand-types/2084/4 "2019-07-22T16:59:06Z")

</div>

The function you are looking for is named `COALESCE`: [https://docs.dremio.com/sql-reference/sql-functions/conditional.html#coalesce](https://docs.dremio.com/sql-reference/sql-functions/conditional.html#coalesce)

---

<div class="post-metadata">

### Author: ![jharrington](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@jharrington](https://community.dremio.com/u/jharrington)
#### Post date: [July 23, 2019, 12:00pm UTC](https://community.dremio.com/t/isnull-does-not-support-operand-types/2084/5 "2019-07-23T12:00:05Z")

</div>

That works as part of a SELECT e.g.

> SELECT COALESCE(end\_dttm, start\_dttm) AS end\_dttm  
> FROM TABLE

but it won’t work in a where clause, which is where I was using it:

> SELECT refno  
> FROM TABLE  
> WHERE COALESCE(end\_dttm, start\_dttm) \>= ‘2019-01-01’

even though the above is perfectly valid when run against SQL Server natively I get the following error when I try it via Dremio:

> com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near ‘\>’.

As this is SQL Server 2008 and I recently learned it is not supported I didn’t bother raising it as an issue.

---

<div class="post-metadata">

### Author: ![laurent](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/laurent/32/16_2.png) [@laurent](https://community.dremio.com/u/laurent)
#### Post date: [July 23, 2019, 3:07pm UTC](https://community.dremio.com/t/isnull-does-not-support-operand-types/2084/6 "2019-07-23T15:07:32Z")

</div>

Would it be possible to [share the query profile](https://www.dremio.com/tutorials/share-query-profile-dremio/) with us?

---

<div class="post-metadata">

### Author: ![jharrington](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@jharrington](https://community.dremio.com/u/jharrington)
#### Post date: [July 23, 2019, 3:21pm UTC](https://community.dremio.com/t/isnull-does-not-support-operand-types/2084/7 "2019-07-23T15:21:53Z")

</div>

Sure, sent privately.

---

<div class="post-metadata">

### Author: ![laurent](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/laurent/32/16_2.png) [@laurent](https://community.dremio.com/u/laurent)
#### Post date: [July 23, 2019, 3:32pm UTC](https://community.dremio.com/t/isnull-does-not-support-operand-types/2084/8 "2019-07-23T15:32:24Z")

</div>

Thanks, it looks like the SQL generated for SQL Server is invalid. I reported the issue to our engineering team.

---

<div class="post-metadata">

### Author: ![jharrington](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@jharrington](https://community.dremio.com/u/jharrington)
#### Post date: [July 23, 2019, 3:33pm UTC](https://community.dremio.com/t/isnull-does-not-support-operand-types/2084/9 "2019-07-23T15:33:05Z")

</div>

Great, thanks for that.
