Hi.
> As long as it is understood we don't handle that idiom -- it
> would be no different than select DISTINCT
> Gruppe,Gruppenummer -- I think we can do this.
Ok, think don't thought about that way ^^
But what happens with other functions, for example SUM, MIN and MAX.
I'm not sure if the SQL standard will force to use the brackets for some functions.
By the way the, there ist something more to change in the function :
elsif($raw =~ /\s/) {
had to be
elsif($raw =~ /[\s()]/) {
Regards,
Lars
> -----Ursprüngliche Nachricht-----
> Von: suppressed
> [mailto:suppressed Im Auftrag
> von Mike Heins
> Gesendet: Mittwoch, 10. August 2005 16:39
> An: suppressed
> Betreff: Re: [ic] A fix for Vend/SQL_Parser.pm
>
> Quoting Lars Tode (suppressed):
> > Dear Interchange Developer Team.
> >
> > I got a problem with the package Vend::SQL_Parser (version 2.10).
> >
> > The following SQL - Statement produces some error messages in the
> > catalog error log :
> >
> > SQL : select DISTINCT( Gruppe ),Gruppenummer from products WHERE
> > aktiv='1' and Sonderposten != 'S' ORDER BY Gruppe;
> >
> > Log message :
> > > shop /cgi-bin/shop/display.html SQL query failed: Bad column name
> > (from DISTINCT( Gruppe )): 'DISTINCT( Gruppe )' at
> > /www/shop/icserver/lib/Vend/SQL_Parser.pm line 839.
> > >
> >
> > It seems that the distinct check can not handle brackets at
> the moment
> > (\s does not include brackets):
> > $self->{distinct} = 1 if $raw =~ s/^distinct\s+//i;
> >
> > The problem could be solved with the modification followed:
> >
> > if ($raw =~ s/^distinct[\s(]+//i) {
> > $self->{distinct} = 1;
> > # delete last bracket if exists
> > $raw =~ s/[\s\)]+$//i
> > }
> >
>
> As long as it is understood we don't handle that idiom -- it
> would be no different than select DISTINCT
> Gruppe,Gruppenummer -- I think we can do this.
>
> If you are passing this to a real SQL interpreter and using
> this to find the table for that, you can use base=real_table
> to prevent having to route it through our cheesy little SQL parser.
>
> Thanks for the suggestion. It is in CVS.
>
> --
> Mike Heins
> Perusion -- Expert Interchange Consulting http://www.perusion.com/
> phone +1.765.647.1295 tollfree 800-949-1889 <suppressed>
>
> Software axiom: Lack of speed kills.
> _______________________________________________
> interchange-users mailing list
> suppressed
> http://www.icdevgroup.org/mailman/listinfo/interchange-users
>
_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.