Massaal testen welke Twinfield administraties een error geven bij General Ledger Details V3

Ja, dat kan. Een manier kan zijn om achtereenvolgens een Twinfield administratie te kiezen en een query te draaien. Via begin...exception...end kunnen foutmeldingen afgevangen worden en afgedrukt, waarna weer de volgende administratie uitgelezen wordt.

De volgende code is een voorbeeld van het per administratie testen of een tabel werkt:

--
-- Scans all Twinfield companies whether the data can be retrieved of a table.
-- Check the DBMS Output tab during execution for the results.
--
begin
  --
  -- Select the Twinfield companies (offices).
  --
  for r 
  in
  ( select spn.code
    ,      spn.provider_data_container_alias
    from   SYSTEMPARTITIONS@DataDictionary spn
    where  spn.provider_name = 'Twinfield'
    order
    by     spn.code
    limit  100 /* Test at most 100 companies. */
  )
  loop
    begin
      use select r.code, r.provider_data_container_alias;
      --
      -- Replace 'create or replace table ... as select *' by
      -- 'select count(*) into l_cnt' when you just want to touch
      -- the records.
      --
      execute immediate 
      'select *'
      || chr(13) || chr(10)
      || 'from   GeneralLedgerDetailsV3'
      || case
         when r.provider_data_container_alias is not null
         then '@' || r.provider_data_container_alias
         end
      || chr(13) || chr(10)
      || 'where  1=1 /* Add filter what you need like year. */'
      ;
      dbms_output.put_line('Success: ' || r.code);
    exception      
      when others
      then
        --
        -- This code is executed when the use or create/select fails.
        --
        dbms_output.put_line('Fail: ' || r.code || ': ' || sqlerrm);
    end;
  end loop;
end;

Na afloop van de code staat in de DBMS Output (tabblad in Query Tool en Invantive Cloud, scherm bij Data Hub) het resultaat.

Het verdient aanbeveling om met set log-native-calls-to-trace true de foutmeldingen te verzamelen en te overleggen. Die landen dan (meestal, afhankelijk van setup) in %USERPROFILE%\invantive\NativeLog. Zie Collect Native Platform Call Data