http://www.perlmonks.org?node_id=778563


in reply to Re: Help with removing dupes from a string with perl
in thread Help with removing dupes from a string with perl

The SQL for looking up a unique column will roughly look like this(depending upon your database),

SELECT DISTINCT(JOBNAME), STATUS, TIMESTAMP, COMMENT FROM YOUR_TABLES +WHERE STATUS = ? ORDER BY TIMESTAMP DESC

Now you remove that loop for looking up individual job names.