Subject: | Can't handle empty columns in the first row |
This program says "Execution ERROR: No such column 'col2'":
#!/usr/bin/perl -wT
use warnings;
use strict;
use diagnostics;
use LWP::Simple;
use DBI;
my $dbh = DBI->connect('dbi:AnyData(RaiseError => 1):');
# Test
$dbh->func('xxx', 'XML', [<DATA>], 'ad_import');
my $sth = $dbh->prepare('SELECT col1, col2 FROM xxx');
$sth->execute();
__DATA__
<table>
<row row_id="1"><col1>C1</col1><col2></col2></row>
<row row_id="2"><col1>C3</col1><col2>C4</col2></row>
</table>