I have tried working on Jeff Zucker's SQL::Parser module to fully support the
IN clause. The current version had a few problems pulling out the right
column name, as well as currectly getting the values inside the parens. I
have done some light testing on this, and it has worked for me.
Next I'm going to try to get all 3 way joins working. Suggestions and/or
corrections to the patch are welcome.
--
Jim Blomo
870c870
< if ($str =~ /^(.+?) IN (\(.+)$/i ) {
---
> if ( $str =~ /^(.+?) IN (\(.+)\) (.*)$/i ) {
873a874,875
> my $extra = $3;
> $back .= ')';
876c878
< if ($front =~ s/^(.+? )(AND|OR|\()(.+)$/$1$2/i) {
---
> if ( $front =~ s/^(.+? )(AND|OR|\() (\w+|\w+\.\w+)$/$1$2/i ) {
915c917
< $str = "$front ($valStr) $back";
---
> $str = "$front ($valStr) $back $extra";