Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2016-12-09 02:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (148 votes). Check out past polls.