in reply to Re^2: SQL error
in thread SQL error

Try this instead:
$stg = $dbh->prepare( q{SELECT REFERENCE, REQUIREMENT FROM TestCasesOutput WHERE PassFail += 'FAIL'} );

Jenda
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.
   -- Rick Osborne