I’m trying to fetch a CSV from the Loket table PayrollRunBalanceSheetByPayrollRunIdAsCsv
, see below stored procedure code.
I get an error:
itgensgr045:
No supported MIME-type produced ‘text/csv’ on table ‘LoketNlRest.PayrollRunDownloads.PayrollRunBalanceSheetByPayrollRunIdAsCsv’.
Do you know any solutions to this error?
declare
l_output varchar2;
begin
cloud_http.set_response_content_type(‘text/csv’);
cloud_http.set_response_header_value(‘Content-Disposition’, ‘attachment; filename=“open-verkoopfacturen.csv”’);
select *
into l_output
from LoketNlRest.PayrollRunDownloads.PayrollRunBalanceSheetByPayrollRunIdAsCsv('XXX')
;
cloud_http.set_response_body_text(l_output);
end;