in reply to Re: Re: Re: Re: OT: Oracle SQL issues
in thread OT: Oracle SQL issues

i'm not sure if you're using that hash slice in the execute or not, but if you are, that'd likely be the problem area. execute wants values that correspond to the order of the bind params, and keys %{$hash->{$table}} is going to return a list of the cols (and thus the values) in some arbitrary order. that might actually result in
$sth->execute(undef, '','50', 0, undef, '','1',1','50 free page points + at signup!',....);
that obviously supplies undef/NULL for columns that are NOT NULL constrained.

anyway, if that's just test code, and you're actually doing some $sth->execute(@{$hash->{$table}}{@ordered_cols}), then i'd say that something is still b0rked, and we need to keep looking..

Replies are listed 'Best First'.
Re: Re:... OT: Oracle SQL issues
by AidanLee (Chaplain) on Sep 13, 2001 at 21:06 UTC
    keys is (i believe) guaranteed to return the hash entries in the same order every time. I've used this technique in the past without hassle.