Here is a simple query:

```
SELECT COUNT(*) FROM m_bug_t 
WHERE date_submitted BETWEEN TO_DATE('2011-08-22','yyyy-mm-dd') AND TO_DATE('2011-08-29','yyyy-mm-dd') 
AND status != 100

```

that gives the following error message 

```
ORA-00932: inconsistent datatypes: expected NUMBER got DATE
00932. 00000 -  "inconsistent datatypes: expected %s got %s"
*Cause:    
*Action:
Error at Line: 2 Column: 22

```

Any ideas? I'm using to using MySQL where this works even without the to\_date function.