ibdknox/Korma — Issue #18: where clause won't work against Oracle `ROWNUM` pseudocolumn
Author: klauern
Created: 2011-11-15 21:49:28+00:00
State: open

I have some Oracle tables that I'd like to query, but since [LIMIT doesn't work the same way in Oracle][2], I'm using Oracle's [ROWNUM Pseudocolumn][1]:

```clj
user=> (select iunit (where {:rownum [< 10]}))
Failure to execute query with SQL:
SELECT * FROM iunit WHERE (iunit.rownum < ?) :: (10)
SQLSyntaxErrorException:
Message: ORA-01747: invalid user.table.column, table.column, or column specification

SQLState: 42000
Error Code: 1747
nil
```

What confuses me is that I get a weird error with the `<=` predicate on it

```clj
user=> (sql-only (select iunit (where {:rownum [<= 10]})))
CompilerException java.lang.RuntimeException: No such var: korma.internal.sql/pred-<=, compiling:(NO_SOURCE_PATH:21)
```

[1]: http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/pseudocolumns009.htm
[2]: http://www.oracle.com/technetwork/issue-archive/2006/06-sep/o56asktom-086197.html