 FROM LittleBearRiverODM.dbo.LabMethods;
 
 --Create a temporary table that will make this easier
-SELECT DISTINCT lm.LabMethodID + @MaxMethodID + 1 AS MethodID, 
+SELECT DISTINCT lm.LabMethodID AS ODM1LabMethodID, 
+	lm.LabMethodID + @MaxMethodID + 1 AS MethodID, 
 	'Specimen analysis' AS MethodTypeCV, 
 	lm.LabMethodID + @MaxMethodID + 1 AS MethodCode, 
 	lm.LabMethodName AS MethodName, lm.LabMethodDescription AS MethodDescription,
 	lm.LabMethodLink AS MethodLink, org.OrganizationID		
-INTO #TempLabMethodInfo
+INTO #tempLabMethodInfo
 FROM LittleBearRiverODM.dbo.LabMethods lm, ODM2.ODM2.Organizations org
 WHERE lm.LabName = org.OrganizationName AND 
 	org.OrganizationID > @MaxOrganizationID;
+
 --Add the LabMethods from ODM 1.1.1 to the ODM2 Methods table
 SET IDENTITY_INSERT ODM2.ODM2.Methods ON; 
 INSERT INTO ODM2.ODM2.Methods (MethodID, MethodTypeCV, MethodCode, MethodName,
 	MethodDescription, MethodLink, OrganizationID)
 SELECT MethodID, MethodTypeCV, MethodCode, MethodName, MethodDescription, 
 	MethodLink, OrganizationID  
-FROM #TempLabMethodInfo 
+FROM #tempLabMethodInfo 
 ORDER BY MethodID;
 SET IDENTITY_INSERT ODM2.ODM2.Methods OFF;
---Drop the temp table
-DROP TABLE #TempLabMethodInfo;
+
 
 --+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
---Populate the ODM2.Actions, ODM2.Results, and ODM2.ResultValues tables for 
+--Populate the ODM2.Actions, ODM2.ActionBy, ODM2.FeatureActions, ODM2.Results, 
+--ODM2TimeSeriesResults, and ODM2.TimeSeriesResultValues tables for 
 --sensor-based time series data
 --+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 

--
--NOTES:  
--1.  Before running this part of the script, need to verify that the 
--'UnitsType' values used in the ODM 1.1.1 database contain valid values from 
--the ODM2 UnitsTypeCV.
--2.  The script only moves Units from the ODM 1.1.1 database that are actually 
--used, so only need to check those and not the whole list of Units in the 
--ODM 1.1.1 database.
-------------------------------------------------------------------------------

--TODO: Verify that UnitsTypeCV terms get loaded to the ODM2 database correctly

-------------------------------------------------------------------------------
-- Created by:  Jeff Horsburgh
-- This script copies an ODM 1.1.1 Database to a blank ODM2 database
--
-- Requirements:
-- 1.  The ODM2 Database must already exist and it must have all of the ODM2 
--     objects in it
-- 2.  The ODM2 controlled vocabularies should be loaded into the ODM2 
--     database prior to running this script.
-- 2.  The ODM2 database must not contain any data prior to running this script
-- 3.  Right now it is hard-coded to an ODM 1.1.1 database called 
--     "LittleBearRiverODM" and an ODM2 database called "ODM2" - these names 
--     will need to be changed for running on other database names
