Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: DBI:CSV SQL parsing problem

by jZed (Prior)
on Nov 05, 2007 at 16:35 UTC ( #649055=note: print w/replies, xml ) Need Help??


in reply to DBI:CSV SQL parsing problem

The syntax that DBD::CSV supports is documented in SQL::Statement::Syntax. It clearly states that the supported argument for set functions is a column name, not a numeric expression:
set function ::= COUNT ( [DISTINCT|ALL] * ) | COUNT | MIN | MAX | AVG | SUM ( [DISTINCT|ALL] col_name )
So the short answer is, no, sorry, you can't currently do that like that in DBD::CSV. Depending on what you want to do, you may be able to build your own UDF (User-Defined-Function) to use here. See SQL::Statement::Function for details of building UDFs.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://649055]
help
Chatterbox?
[LanX]: machiato!
shmem fills a glas with sambuca, drops 3 beans of coffee into it, lights the stuff and hands it to erix
[Your Mother]: Liquore Strega. :P
[shmem]: s/beans of coffee/enterprise beans/ :-P
[erix]: Take your bottles -- you're all invited! :)

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (9)
As of 2017-03-28 12:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (330 votes). Check out past polls.