$select = $dbh->prepare(" SELECT Server, SUM(Average) AS NetUse, FROM stats WHERE Statistic Like 'NetworkInterface%' "); #### Server,Statistic,Average "MGM9469DC31","MemoryPagessec",15.604275 "MGM9469DC31","PhysicalDiskTotalPCTDiskTime",8.740074 "MGM9469DC31","PhysicalDiskTotalAvgDiskQueueLength",0.087401 "MGM9469DC31","ProcessorTotalPCTProcessorTime",10.410065 "MGM9472FE01","MemoryPagessec",9.633776 "MGM9472FE01","NetworkInterfaceHPNC3163FastEthernetNIC2NetworkLoadBalancingFilte rDeviceBytesTotalsec",96810.245977 "MGM9472FE01","NetworkInterfaceHPNC3163FastEthernetNICBytesTotalsec",3164.367221 "MGM9472FE01","NetworkInterfaceHPNC7770GigabitServerAdapterBytesTotalsec",613.16 0639 "MGM9472FE01","PhysicalDiskTotalPCTDiskTime",3.504199 "MGM9472FE01","PhysicalDiskTotalAvgDiskQueueLength",0.035042 "MGM9472FE01","ProcessorTotalPCTProcessorTime",10.900135 #### SQL ERROR: Bad table or column name 'FROM stats' has chars not alphanumeric 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.