1

Topic: Subsequent exports from Mapmate to Recorder

I am in the process of setting up a Recorder database, and have exported some records from Mapmate using the query below. I now want to export subsequent records from the same Mapmate database to add to Recorder, but the query i have for subsequent exports from Mapmate requires me to enter a cuk. My copy of Mapmate is a hub that receives data from many cuks, and i want to export all of these at once, is there a query that will do this?

thank you
Lorna

SELECT Records.[_guk], Records.[_guk] AS MapMate_guk, [Taxa\Default].Taxon, [Sites\Default].Name AS Location_name, [Sites\Default].OSGridRef AS Gridref, IIf([Sites\Default].[ViceCounty]>200,'H' & [Sites\Default].[ViceCounty]-200,[Sites\Default].[ViceCounty]) AS Vice_county, (IIf(Records.Quantity=-1, 'd', IIf(Records.Quantity=-2, 'a', IIf(Records.Quantity=-3, 'f', IIf(Records.Quantity=-4, 'o', IIf(Records.Quantity=-5, 'r', IIf(Records.Quantity=-6, 'vr', IIf(Records.Quantity=-7, 'NotPresent', IIf(Records.Quantity=0, '+', Records.Quantity))))))))) & (IIf([Records]![*Stage]='0', 'None', IIf([Records]![*Stage]='l', 'FirstWinter', IIf([Records]![*Stage]='m', 'SecondWinter', IIf([Records]![*Stage]='n', 'ThirdWinter', IIf([Records]![*Stage]='o', 'FourthWinter', IIf([Records]![*Stage]='p', 'FirstSummer', IIf([Records]![*Stage]='q', 'SecondSummer', IIf([Records]![*Stage]='r', 'ThirdSummer', IIf([Records]![*Stage]='s', 'FourthSummer', [TaxonStage].[Stage])))))))))) & (IIf([Records]![*Sex]='u', '', IIf([Records]![*Sex]='g', 'MixedSexGroup', [TaxonSex].[Sex]))) AS Abundance, IIf([Records].[Date] = [Records].[DateTo], Format([Records].[Date],'dd/mm/yyyy'), (Format([Records].[Date],'dd/mm/yyyy') & " - " & Format([Records].[DateTo],'dd/mm/yyyy'))) AS DateRange, Recorders.Name AS Recorder, Recorders_1.Name AS Determiner, Methods.Method, Records.Comment
FROM ((((((Records INNER JOIN [Taxa\Default] ON Records.[*Taxon] = [Taxa\Default].[_guk]) INNER JOIN [Sites\Default] ON Records.[*Site] = [Sites\Default].[_guk]) INNER JOIN Methods ON Records.[*Method] = Methods.[_guk]) INNER JOIN Recorders ON Records.[*Recorder] = Recorders.[_guk]) INNER JOIN TaxonStage ON Records.[*Stage] = TaxonStage.[_guk]) INNER JOIN TaxonSex ON Records.[*Sex] = TaxonSex.[_guk]) INNER JOIN Recorders AS Recorders_1 ON Records.[*Identifier] = Recorders_1.[_guk]
WHERE ((([Sites\Default].OSGridRef) Is Not Null));

2 (edited by ser 01-05-2013 07:14:19)

Re: Subsequent exports from Mapmate to Recorder

Lorna,

This is the query I use to export data from MapMate, It is based on exporting between two MapMate Generations (admittedly because I store all my exported MapMate data in different surveys for each CUK, I also have the same routine with a CUK filter as well) - it is not 100% reliable because of the way MapMate marks records as edited, changing the Generation to negative, rather than changing it to the generation in which it was edited!

SELECT Records.[_guk], Records.[_guk] AS MapMate_Key, Records.[_guk] AS MapMate_ID, [Taxa\Default].Taxon AS Species_Name, [Sites\Default].Name AS Location, [Sites\Default].OSGridRef AS Grid_Reference, IIf([Sites\Default].[ViceCounty]>200,'H' & [Sites\Default].[ViceCounty]-200,[Sites\Default].[ViceCounty]) AS Vice_county_Number, (IIf(Records.Quantity=-1, 'd', IIf(Records.Quantity=-2, 'a', IIf(Records.Quantity=-3, 'f', IIf(Records.Quantity=-4, 'o', IIf(Records.Quantity=-5, 'r', IIf(Records.Quantity=-6, 'vr', IIf(Records.Quantity=-7, 'NotPresent', IIf(Records.Quantity=0, '+', Records.Quantity))))))))) & " " & IIf([Records]![*Stage]='0',"",IIf([Records]![*Stage]='1',IIf([Records]![*Sex]<>'u','Adult ' & [TaxonSex]![Sex],'Adult'),[TaxonStage]![Stage])) & " " & IIf([Records]![*Sex]<>'u' And [Records]![*Sex]<>'',[TaxonSex].[Sex],"") AS Abundance_Data, [RecordStatus].[Status] AS Record_Type, Methods.Method AS Sampling_Method, IIf([Records].[DateTo]-[Records].[Date]<27,Format([Records].[Date],'dd/mm/yyyy'),IIf([Records].[DateTo]-[Records].[Date]>32,Format([Records].[Date],'yyyy'),Format([Records].[Date],'mmmm yyyy'))) AS [Date], Recorders.Name AS Observers, Recorders_1.Name AS Determiner_Name, Records.Comment AS Comment, [References].[Author] & " (" & [References].[Year] & "): " & [References].[Title] AS Publication_Reference, Abs(Records.[_gen]) AS Generation
FROM ((((((((Records INNER JOIN [Taxa\Default] ON Records.[*Taxon] = [Taxa\Default].[_guk]) INNER JOIN [Sites\Default] ON Records.[*Site] = [Sites\Default].[_guk]) INNER JOIN Methods ON Records.[*Method] = Methods.[_guk]) INNER JOIN Recorders ON Records.[*Recorder] = Recorders.[_guk]) INNER JOIN TaxonStage ON Records.[*Stage] = TaxonStage.[_guk]) INNER JOIN TaxonSex ON Records.[*Sex] = TaxonSex.[_guk]) LEFT JOIN [References] ON Records.[*Reference] = References.[_guk]) INNER JOIN Recorders AS Recorders_1 ON Records.[*Identifier] = Recorders_1.[_guk]) INNER JOIN RecordStatus ON Records.[*Status] = RecordStatus.[_guk]
WHERE ((Abs([Records].[_gen])>[Enter Last Generation already exported - eg 224]) And (Abs([Records].[_gen])<=[Enter last Generation to be exported - eg 300]);

The reason the MapMate CUK is exported twice is that I use it to create the Recorder GUI and add it to 'Surveyor's Ref' to allow comparison with original MapMate data
Craig

Craig Slawson
Staffordshire Ecological Record

3

Re: Subsequent exports from Mapmate to Recorder

I have finally got around to trying this out - very useful, thank you very much!

Lorna

4

Re: Subsequent exports from Mapmate to Recorder

It appears I spoke too soon - on looking at the exported data in detail it appears that MapMate has exported a mixture of data that has already been exported and data that hasn't. I was expecting to export just over 15,700 records, but MapMate has exported about 33,000 records, most of which have already been exported. On further inspection MapMate has only exported some of the datasets that have been added in the past year.

Has anyone else encountered this problem or know of a solution?

thank you
Lorna