Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

DrAxeman's scratchpad

by DrAxeman (Beadle)
on Aug 09, 2005 at 14:43 UTC ( #482225=scratchpad: print w/ replies, xml ) Need Help??

$select = $dbh->prepare(" SELECT Server, SUM(Average) AS NetUse, FROM stats WHERE Statistic Like 'NetworkInterface%' ");

Data looks like this

Server,Statistic,Average "MGM9469DC31","MemoryPagessec",15.604275 "MGM9469DC31","PhysicalDiskTotalPCTDiskTime",8.740074 "MGM9469DC31","PhysicalDiskTotalAvgDiskQueueLength",0.087401 "MGM9469DC31","ProcessorTotalPCTProcessorTime",10.410065 "MGM9472FE01","MemoryPagessec",9.633776 "MGM9472FE01","NetworkInterfaceHPNC3163FastEthernetNIC2NetworkLoadBala +ncingFilte rDeviceBytesTotalsec",96810.245977 "MGM9472FE01","NetworkInterfaceHPNC3163FastEthernetNICBytesTotalsec",3 +164.367221 "MGM9472FE01","NetworkInterfaceHPNC7770GigabitServerAdapterBytesTotals +ec",613.16 0639 "MGM9472FE01","PhysicalDiskTotalPCTDiskTime",3.504199 "MGM9472FE01","PhysicalDiskTotalAvgDiskQueueLength",0.035042 "MGM9472FE01","ProcessorTotalPCTProcessorTime",10.900135

Error:

SQL ERROR: Bad table or column name 'FROM stats' has chars not alphanu +meric or underscore! DBD::CSV::db prepare failed: SQL ERROR: Bad table or column name 'FROM + stats' has chars not alphanumeric or underscore! [for Statement " SELECT Server, SUM(Average) AS NetUse, FROM stats WHERE Statistic Like 'NetworkInterface%' "] at ./hosts2.pl line 62. DBD::CSV::db prepare failed: SQL ERROR: Bad table or column name 'FROM + stats' has chars not alphanumeric or underscore! [for Statement " SELECT Server, SUM(Average) AS NetUse, FROM stats WHERE Statistic Like 'NetworkInterface%' "] at ./hosts2.pl line 62.
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2015-07-06 03:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (70 votes), past polls