Using Data::Dumper I print @SQLvars like so, before executing the query
warn Dumper \@SQLvars;
I see the array printed, with 4 items in each row of the array, like this
$VAR1 = [
{
'COLX' => 'TESTA1',
'COLY' => 'TESTA2',
'COLZ' => 'TESTA3'
},
{
'COLX' => 'TESTB1',
'COLY' => 'TESTB2',
'COLZ' => 'TESTB4'
},
I then execute the query
my $sth = $dbh->prepare($SQLQueryString);
my $array_ref = $dbh->selectall_arrayref( $SQLQueryString, { Slice =>
+{} }, @SQLvars );
Which returns this error
DBD::Oracle::db selectall_arrayref failed: called with 9 bind variable
+s when 3 are needed
For the life of me I can't work out why it thinks there should be 9. If you or anyone else can advise that'd we great.