Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

DrAxeman's scratchpad

by DrAxeman (Scribe)
on Aug 09, 2005 at 14:43 UTC ( [id://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
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (6)
As of 2024-04-19 03:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found