{sql:select * from her_woodland
JOIN her_project on her_project.rowid=her_woodland.fileno
WHERE her_project.rowid = @File Number@
}







GAZETTEER OF SITES RECOMMENDED FOR SCHEDULING

 

Marion Page, Historic Environment Record Manager


{subtable:
SELECT her_core.prn,

ifnull(her_core.name,' ') as name,

 

ifnull(her_core.summary,' ') as s1,

 

ifnull(her_core.desc_1,' ') as d1,


ngr,

 

community,

 

unitary,

 

ifnull(GROUP_CONCAT(DISTINCT concat(ifnull(her_core_site_type.type,' ')) SEPARATOR ', '),' ') as t1,

 

 

ifnull(GROUP_CONCAT(DISTINCT concat(ifnull(her_condition.condition,' ')) SEPARATOR '/ '),' ') as c1,

 

ifnull(her_condition.condesc,' ') as cd1,

 

ifnull(GROUP_CONCAT(DISTINCT concat(ifnull(her_threat.type,'None recorded ')) SEPARATOR '/ '),' ') as thr1,

 

ifnull(GROUP_CONCAT(DISTINCT concat(ifnull(her_threat.signif,'None recorded ')) SEPARATOR '/ '),' ') as thr2,

 

ifnull(GROUP_CONCAT(DISTINCT concat(ifnull(her_threat.timescale,'None recorded ')) SEPARATOR '/ '),' ') as thr3,

 

ifnull(her_threat.details, 'None recorded ') as thr4,

 

ifnull(GROUP_CONCAT(DISTINCT concat(ifnull(her_management_statutory.rec_scheme,'None recorded ')) SEPARATOR '/ '),' ') as stat1

 


FROM her_woodland
JOIN her_project_link on her_project_link.fileno=her_woodland.fileno
JOIN her_core on her_core.watprn=her_project_link.watprn
JOIN geo_locations on geo_locations.watprn=her_core.watprn
JOIN her_core_site_type on her_core_site_type.watprn=her_core.watprn

LEFT JOIN her_condition on her_condition.watprn=her_core.watprn
LEFT JOIN her_threat on her_threat.watprn=her_core.watprn

LEFT JOIN her_management_statutory on her_management_statutory.watprn=her_core.watprn

WHERE her_project_link.fileno=[rowid] and isnull(her_core.flag)

 

group by her_core.prn;
title:[b]PRN -[/b] ,prn, [br][br][b]RECOMMENDATION -[/b] , stat1 ,[br][br][b]NAME -[/b] , name , [br][b]TYPE -[/b] ,t1, [br][b]CONDITION -[/b] ,c1, [b][BR][BR]CONDITION DESCRIPTION[/b][br], cd1, [br][br][b]NGR -[/b] , ngr , [br][b]COMMUNITY -[/b] ,community, [br][b]COUNTY -[/b] , unitary, [br][br][b]SITE DESCRIPTION[/b][br],s1 , [br][br],d1 ,[br][b]THREATS[/b][br][b]THREAT TYPE[/b]  ,thr1 , [b]SIGNIFICANCE[/b]  ,thr2 , [b]TIMESCALE[/b] , thr3 , [br][b]THREAT DETAILS[/b] , thr4 ,  }