1

Re: Lat long

How can I pull out the Sample.Lat and Sample.Long in an XML report?

SELECT Sample.Spatial_ref,
       YEAR(Sample.vague_date_start),
       Sample.lat,
       Sample.long
FROM Sample
INNER JOIN Taxon_Occurrence ON Taxon_Occurrence.Sample_key = Sample.Sample_key
WHERE ...

Should this work? I get nothing, not even a column.

Charlie Barnes
Information Officer
Greater Lincolnshire Nature Partnership

2

Re: Lat long

Just a hunch, have you tried aliasing the column names. E.g.

SELECT Sample.Spatial_ref AS Spatial_Reference,
       YEAR(Sample.vague_date_start),
       Sample.lat AS Latitude,
       Sample.long AS Longitude
FROM Sample
INNER JOIN Taxon_Occurrence ON Taxon_Occurrence.Sample_key = Sample.Sample_key
WHERE...

Recorder has special processing of grid columns in order to translate to your output system (e.g. OSGB) so it may be that kicking in.

John van Breda
Biodiverse IT

3

Re: Lat long

Bingo! Could have sworn I tried that...

Charlie Barnes
Information Officer
Greater Lincolnshire Nature Partnership