{sql:select * from her_woodland
JOIN her_project on her_project.rowid=her_woodland.fileno
WHERE her_project.rowid = @File Number@
}
GAZETTEER OF SITES
M. SHINER, Historic Environment Record Manager
{subtable:
SELECT coal_core.prn,
ifnull(coal_core.name,' ') as name,
ifnull(coal_core.summary,' ') as s1,
ifnull(coal_core.desc_1,' ') as d1,
ngr,
community,
ifnull(GROUP_CONCAT(DISTINCT concat(ifnull(her_core_site_type.type,' ')) SEPARATOR '/ '),' ') as t1,
ifnull(GROUP_CONCAT(DISTINCT concat(ifnull(her_core_site_type.period,' ')) SEPARATOR '/ '),' ') as p1,
ifnull(GROUP_CONCAT(DISTINCT concat(ifnull(her_condition.condition,' ')) SEPARATOR '/ '),' ') as c1,
ifnull(GROUP_CONCAT(DISTINCT concat(ifnull(her_condition.evidence,' ')) SEPARATOR '/ '),' ') as e1,
ifnull(GROUP_CONCAT(DISTINCT concat(ifnull(her_status.status,'None recorded'),' ',ifnull(her_status.reference,' '),' ',ifnull(her_status.grade,' ')) SEPARATOR '/ '),' ') as status1
FROM her_woodland
JOIN her_project_link on her_project_link.fileno=her_woodland.fileno
JOIN coal_core on coal_core.watprn=her_project_link.watprn
JOIN geo_locations on geo_locations.watprn=coal_core.watprn
JOIN her_core_site_type on her_core_site_type.watprn=coal_core.watprn
LEFT JOIN her_condition on her_condition.watprn=coal_core.watprn
LEFT JOIN her_status on her_status.watprn=coal_core.watprn
WHERE her_project_link.fileno=[rowid]
group by coal_core.watprn
order by coal_core.prn ASC;
title:[b]PRN[/b] ,prn, [br][br][b]NAME[/b] , name , [b]TYPE[/b] ,t1, [b]PERIOD[/b] , p1, [br][br][b]EVIDENCE[/b] ,e1, [b]CONDITION[/b] ,c1, [b]STATUS[/b] [i],status1,[/i] [br][br][b]NGR[/b] , ngr , [b]COMMUNITY[/b] ,community, [br][br][b]HER DESCRIPTION[/b][br],s1 , [br],d1 ,}