Can someone take a look at the following batch update? It's intended to take a CSV containg taxon occurrence keys and source keys and update the TAXON_OCCURRENCE_SOURCES table, but after a minute or two of chugging, nothing (absolutely nothing) happens :/
I've made a lot of assumptions from reading other batch updates, so not convinced I've got everything right - but I'm not getting any errors.
<?xml version="1.0" ?>             
<batchupdate menupath="lerc" title="ctoes" description="">
<CSVTables>
<CSVTable name="#CSV1">
<CSVFile description="Taxon Occurrences file" />
<CSVColumn name="RecordKey" datatype="Char" size="16" />
<CSVColumn name="SourceKey" datatype="Char" size="16" />
</CSVTable>
</CSVTables>
<SQL>
<Where keytype="Default">
DECLARE @occurrence_key char(16), @source_key char(16), @source_link_key char(16), @custodian char(8)
DECLARE CSV1_Cursor CURSOR FOR 
  (SELECT RecordKey, SourceKey FROM #CSV1)
OPEN CSV1_Cursor
FETCH NEXT FROM CSV1_Cursor INTO @occurrence_key, @source_key 
  -- Loops through the csv data and adds the records 
  WHILE @@FETCH_STATUS = 0
  BEGIN
    
    EXECUTE spNextKey 'TAXON_OCCURRENCE_SOURCES', @source_link_key OUTPUT 
    
    INSERT INTO TAXON_OCCURRENCE_SOURCES VALUES(@source_link_key, @occurrence_key, @source_key, '0')
  
       FETCH NEXT FROM CSV1_Cursor INTO @occurrence_key, @souce_key
  END
CLOSE  CSV1_Cursor
DEALLOCATE CSV1_Cursor
</Where>
</SQL>
</batchupdate>
Charlie Barnes
Information Officer
Greater Lincolnshire Nature Partnership