itgenoda042
Statement #1 ‘select * from … 5342395E19’) s" starting on line 1 caused an error.
The requested OData URL could not be found on the AFAS Online server.
The remote server returned an error: (404) Not Found.
Please contact Invantive Support or use another table. https://(omgeving).rest.afas.online/profitrestservices/subjectconnector/1634/ef6dfc0430944e5482d33e5342395e19?take=50000
Deze vraag is automatisch gesloten na 1 week inactiviteit. Het laatste gegeven antwoord is gemarkeerd als oplossing.
Gelieve een nieuwe vraag te stellen via een apart topic als het probleem opnieuw optreedt. Gelieve in de nieuwe vraag een link naar dit topic op te nemen door de URL er van in de tekst te plakken.
Uiteindelijk zijn de documenten wel te vinden; een deel van de documenten geeft een (ongedocumenteerde) HTTP 404. Het vermoeden is dat 404 op Subject betekent: “Geen rechten”.
Query:
--
-- In case any document to which access seems impossible: ignore it.
--
-- Raises 404 Not Found when not accessible:
--
-- The requested OData URL could not be found on the AFAS Online server.
-- Please contact Invantive Support or use another table.
-- (https://93926.rest.afas.online/profitrestservices/subjectconnector/9520/90b21cfe240a4213805a164886ba6927?take=50000).
--
-- The 404 can not be answered from document cache on Subject connector, so it will consume
-- approximately 125 ms for each row on every run.
--
set ignore-http-404-errors@afas true
create or replace table tstdoc@sql
as
select m.attachment_id
, m.subject_id
, m.file_id
, m.file_name
, s.filedata
, s.mimetype
from AfasOnline.GetConnector.profit_subject_attachments@afas m
join Subject@afas(m.subject_id, m.file_id) s
--
-- Possibly forwardable server-side filter.
--
where m.file_name like 'I________.pdf'
--
-- Fine-tuned check that the invoice file name pattern is matched.
--
and regexp_instr(m.file_name, '^I[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9].pdf$') = 1