Dear all
i am having a problem with SQL-Statement-1.005, whereas
SQL-Statement-0.1020 is working fine.
SQL ERROR: Mismatched parentheses in WHERE clause!
SV = RV(0x810cad0) at 0x829105c
REFCNT = 1
FLAGS = (PADBUSY,PADMY,ROK)
RV = 0x83844e4
DBD::CSV::st execute failed: dbih_getcom handle
'DBD::CSV::Statement=HASH(0x83844e4)'
is not a DBI handle (has no magic) at
/usr/local/lib/perl5/site_perl/5.6.0/SQL/Statement.pm line 164.
I think i tracked this down to Parser.pm the cleansql routine which
skips closing parens, but not the
corresponding openings:
warn "Before $sql";
$sql =~ s~'(([^'$e]|$e.|'')+)'~push(@$fields,$1);$i++;"?$i?"~ge;
warn "After $sql";
Before
SELECT KOLOM1,KOLOM8,KOLOM5,KOLOM6,KOLOM7 FROM MYTABLE
WHERE ( ( ( ( KOLOM4 = '123456' OR KOLOM4 = '' ) AND KOLOM3 = '127' )
OR KOLOM8 = 'TRUE' ) AND KOLOM1 = 'bla' )
at /usr/local/lib/perl5/site_perl/5.6.0/SQL/Parser.pm line 1679.
After SELECT KOLOM1,KOLOM8,KOLOM5,KOLOM6,KOLOM7 FROM MYTABLE
WHERE ( ( ( ( KOLOM4 = ?0? OR KOLOM4 = '?1?127?2?TRUE?3?bla' )
at /usr/local/lib/perl5/site_perl/5.6.0/SQL/Parser.pm line 1681.
The (not ideal)query is generated from another application, which is not
easy to change, so that is not an option
Switching to SQL-Statement-0.1020 solves this, but introduces another
problem, (there i cannot use the
SELECT KOLOM1, NULL, KOLOM3 statement)
Any suggestions ?
Thanks
Walter Takens
- Re: SQL-Statement problem Walter B. Takens
- Re: SQL-Statement problem Jeff Zucker
- RE: SQL-Statement problem Dan Muey
- Re: SQL-Statement problem Jeff Zucker
