On Mon, 09 Jun 2003 09:30:48 +0200 deadtwoU wishUknew <[EMAIL PROTECTED]> wrote:

> Has anyone here successfully managed to get SQL DECODE to
> work with perl DBI using Oracle as a db backend. I keep
> getting the same error continously...
> "$h-<rows count is incomplete before all rows fetched"
> Whether this result from the use of DECODE or not I don't
> know....but it seems DECODE does not work at all...can
> anyone vouch for this? 

DECODE() works fine with DBI.  It does, however, often add one or
several levels of commas and parenthesis which you will have to be
very careful balancing.

> Now, I read a bit bout this, and in the DBI draft it states
> that row count may be incomplete due to oracle's read-ahead
> cache...*hmm* 

That is exactly true.  For a variety of reasons, rows() can not be
trusted until after *ALL* rows have been processed or fetched.

> Anyone can explain that to me, or possibly provide a
> working example of how to cure this, and possibly a working
> eg. of use of DECODE within perl DBI :)

Without seeing the exact SQL and the relevant parts of the script that
uses it, only random guesses are possible.  Please use cut and paste
from the original script to be certain we don't just see your typos.

Send the information to the list, not to me personally.

-- 
Mac :})
** I normally forward private questions to the appropriate mail list. **
Ask Smarter: http://www.catb.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.

Reply via email to