我正在使用此处提供的示例的略微修改版本:https ://metacpan.org/pod/distribution/SQL-Statement/lib/SQL/Statement/Structure.pod
use SQL::Statement;
use Data::Dumper;
my $sql = q{
SELECT c1
, col2 as c2
, c3
FROM table1 t1, table2 t2
WHERE t1.c1 = t2.c2
and t1.c1 in (11111, 22222, 33333)
GROUP by t1.c1
};
my $parser = SQL::Parser->new('ANSI');
$parser->{RaiseError}=1;
$parser->{PrintError}=0;
my $stmt = SQL::Statement->new($sql, $parser);
print Dumper($stmt->where_hash());
但是当我这样做时,我得到了这个没有意义的错误,因为它是一个非常常见的构造:
Bad table or column name: '11111,22222,33333' has chars not alphanumeric or underscore! at /home/palert/perl5/perlbrew/perls/perl-5.28.1/lib/site_perl/5.28.1/SQL/Statement.pm line 90.
我错过了什么?