in reply to Re^2: Postprocess Template Toolkit DBI Call
in thread Postprocess Template Toolkit DBI Call

Taken me a few days but think I've nutter it out.
[% sql_entries = query.execute() %] [% terms = {} %] [% FOREACH row IN sql_entries; terms.${row.LOCATION} = "${row.LOCID}"; END %] [% FOREACH row IN terms.keys %] [% row %]: [% terms.$row %] [% END %]

Note: LOCATION and LOCID are columns returned from the query