Closed ariel123 closed 12 years ago
you should be able to say (select tbl (where (<= "rownum" 2)))
That didn't work, it gave the following error: CompilerException java.sql.SQLSyntaxErrorException: ORA-01722: invalid number
Ah, yes. It's taken as a String value in that case. Sorry.
The fact is, that column references are supposed to be quoted, so it's not an easy fix.
We would need some syntax for identifiers, that should be left alone.
In the meantime, please use (select tbl (where "rownum <= 2"))
Thank you. Your suggestion worked.
In version 1.0.0 I was able to use rownum to query Oracle with no problem:
(select tbl (where (<= :rownum 2)))
It generated sql that works, i.e.
select mytable.* where rownum <= 2
but with later versions, [clojureql "1.1.0-SNAPSHOT"] the generated sql looks like that and of course it fails:
select mytable.* where mytable.rownum <= 2
Is there a way to fix it?