Process Description:
The Saltwater FIM database was queried using a python script using the arcpy library that completed the steps below: 1) created a query layer from the FIM database using the following TSQL query, which was provided by Tim MacDonald (FIM staff), to Chris Boland (Geodatabase administrator) via email on 2/19/2018: SELECT convert(INT, row_number () over (order by p.Reference, c.Scientificname ASC)) as ObjectID, geometry::STPointFromText('POINT(' + Cast(Cast(p.Longitude AS decimal(18, 6)) AS varchar(50)) + ' ' + Cast(Cast(p.Latitude AS decimal(18, 6)) AS varchar(50)) + ')', 4326) AS Shape, p.Reference,p.Sampling_Date,p.Latitude ,p.Longitude ,p.Gear ,c.Scientificname,c.Commonname,c.TotalNum,c.avg_size,c.min_size,c.max_size,GETDATE() AS ExDate FROM(SELECT b.Reference,l.Scientificname,l.Commonname,b.NODCCODE,b.TotalNum,l.avg_size,l.min_size,l.max_size FROM(SELECT a.Reference,a.NODCCODE,Sum(Power(a.splttyp,a.spltlvl)*(a.Number/a.spltcells)) as TotalNum,a.Length_measurement_type FROM (SELECT [Reference],Case isnull(Splittype,'.') When '.' Then 1 Else CONVERT(tinyint, Splittype) End as splttyp ,Splitlevel ,Case isnull(Splitlevel,' .') When ' .' Then 1 Else CONVERT(tinyint, Splitlevel) End as spltlvl ,Case isnull(cells,0) When 0 Then 1 Else [cells] End as spltcells ,[NODCCODE] ,[Number] ,Length_measurement_type FROM [FIMCorpInshore].[hsdb].tbl_corp_biology_number as bn)a GROUP BY a.reference, a.NODCCODE, a.Length_measurement_type)b LEFT JOIN(SELECT bn.Reference ,spp.Scientificname ,spp.Commonname ,bn.NODCCODE,avg(bl.Length) as avg_size,min(bl.length) as min_size ,max(bl.length) as max_size FROM ([FIMCorpInshore].[hsdb].tbl_corp_biology_number as bn LEFT JOIN [FIMCorpInshore].[hsdb].tbl_corp_biology_lengths as bl ON (bn.Reference = bl.Reference) AND (bn.Species_record_id = bl.Species_record_id)) LEFT JOIN [FIMCorpInshore].hsdb.tbl_corp_ref_species_list as spp on bn.NODCCODE = spp.NODCCODE GROUP by bn.Reference, bn.NODCCODE, spp.Scientificname, spp.Commonname)l ON b.reference = l.reference and b.nodccode = l.nodccode)c left join FIMCorpInshore.hsdb.tbl_corp_physical_master as p on c.Reference = p.Reference The resulting data were exported into a file geodatabase, projected to NAD 1983 (2011) Florida GDL Albers (Meters) and Web Mercator projections before replacing the existing data in the FWC GIS Enterprise Geodatabases.