in reply to Re^2: Perl or SQL ?
in thread Perl or SQL ?

I've just figured it out
$sth=$dbh->prepare("@sqlcmd"); $sth->execute; while (($data) = $sth->fetchrow) { if($data =~ /create/) { print "$data\n"; } }
I've simplified the regex I really need to use to demonstrate what I was attempting to do.
I agree that for larger datasets the create view/bcp out is the way to go. Performance testing has revealed this to be the case.
Thanks for all the responses, this is a top class site

Replies are listed 'Best First'.
Re^4: Perl or SQL ?
by Anonymous Monk on Dec 21, 2005 at 10:44 UTC
    Err I need to eat humble pie. The above code only works if I change the select to retrieve one column from sysaudits not all columns.
    Please disregard my previous post. I still have the same problem