> Why don't you try to debug this stuff in SQL*Plus before you > go to DBI. > Issue 1 isn't really a DBI issue - it's an SQL issue. > > Instead of "LIMIT 1" try adding "and rownum <= 1" to the > where clause.
But remember that ROWNUM is assigned before any ORDER BY. So you have to wrap it in a subquery, e.g. select * from (select whatever from whereever order by thingy) where rownum <= 1 Or even: select * from (select whatever, row_number() over (order by thingy) r from whereever) where r = 1 Try http://asktom.oracle.com for general Oracle questions, there's usually an answer in the archives for most questions. e.g. http://asktom.oracle.com/pls/ask/f?p=4950:8:7765691454142977697::NO::F4950_P 8_DISPLAYID,F4950_P8_CRITERIA:127412348064, -- Andy Hassall <[EMAIL PROTECTED]> / Space: disk usage analysis tool <http://www.andyh.co.uk> / <http://www.andyhsoftware.co.uk/space>