Currently if you do something like:

        select year(pubdate) as year;

you can't refer to $set->{year}, instead it's $set->{'year(pubdate) 
as year'}.  I didn't make this an option, perhaps it should be, but 
in any case, if you add the following line to SQLSelect just before 
the check for LongNames, that will fix this case.

     $fields = join(',', map { (/\bAS\s+(.*)\s*$/i)?$1:$_} split 
(/\s*,\s*/, $fields));

Note however that there is a bug that has existed before this. 
Namely if the expression to the left of the AS has a comma in it, the 
whole field parsing code is going to fall apart.  I'm pretty sure 
that there will only ever be a comma inside of parenthesis, so it 
should be possible to fix that, but I'm not going to try at three in 
the morning.
-- 

Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to