Hello, Im working on running this $sqlstatement for work purposes. My = $txtAgentID='skraal'; will be an array of 13 agents. (I was just trying to get this to run for one agent) The error message Im getting is at the bottom. Any Ideas? Is my SQL statement a bit too complex for this script?
Any information would be helpful Thx daniel (code snippit) use DBI; $dbh = DBI->connect('dbi:ODBC:agent'); my = $txtAgentID='skraal'; $sqlstatement = "SELECT qryScrubInfo.txtCustomer, qryScrubInfo.numTicketNumber, qryScrubInfo.txtAgentID, qryScrubInfo.txtAgenName, qryScrubInfo.datDate, qryScrubInfo.datDateIncidentWasNoted, tblScrubDetail.txtCategory, tblScrubDetail.Description, tblScrubDetail.ynWasFixed, [txtAgentID], tblCustomer.[Floor Advocate], qryScrubInfo.txtScrubingTech FROM (tblScrubDetail RIGHT JOIN qryScrubInfo ON tblScrubDetail.numTicketNumber = qryScrubInfo.numTicketNumber) LEFT JOIN tblCustomer ON qryScrubInfo.txtCustomer = tblCustomer.txtCustomer WHERE (((qryScrubInfo.txtAgentID)=[Forms]![frmUnfixed]![txtAgentID]) AND ((tblScrubDetail.ynWasFixed)=No))"; $sth = $dbh->prepare($sqlstatement); $sth->execute || die "Could not open $db ?"; while (@row=$sth->fetchrow_array) {print "@row\n"} C:\Perl\bin>perl sql.pl Array found where operator expected at sql.pl line 8, at end of line (Missing operator before ?) String found where operator expected at sql.pl line 8, at end of line syntax error at sql.pl line 6, near "my =" Execution of sql.pl aborted due to compilation errors. C:\Perl\bin> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]